patches/binutils/2.17/300-006_better_file_error.patch
changeset 745 e445c00d134d
parent 744 4bf8448536d5
child 746 b150d6f590fc
     1.1 --- a/patches/binutils/2.17/300-006_better_file_error.patch	Mon Jul 28 20:10:34 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,17 +0,0 @@
     1.4 -diff -dur binutils-2.17.old/bfd/opncls.c binutils-2.17/bfd/opncls.c
     1.5 ---- binutils-2.17.old/bfd/opncls.c	2006-03-16 13:20:16.000000000 +0100
     1.6 -+++ binutils-2.17/bfd/opncls.c	2007-05-01 18:26:11.000000000 +0200
     1.7 -@@ -158,6 +158,13 @@
     1.8 - {
     1.9 -   bfd *nbfd;
    1.10 -   const bfd_target *target_vec;
    1.11 -+  struct stat s;
    1.12 -+
    1.13 -+  if (stat (filename, &s) == 0)
    1.14 -+    if (S_ISDIR(s.st_mode)) {
    1.15 -+      bfd_set_error (bfd_error_file_not_recognized);
    1.16 -+      return NULL;
    1.17 -+    }
    1.18 - 
    1.19 -   nbfd = _bfd_new_bfd ();
    1.20 -   if (nbfd == NULL)