This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build fails



2.11.2's libiberty/strerror.c looks like this:

#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
   might declare sys_errlist in a way that the compiler might consider
   incompatible with our later declaration, perhaps by using const
   attributes.  So we hide the declaration in errno.h (if any) using a
   macro. */
#define sys_errlist sys_errlist__
#endif

#include <stdio.h>
#include <errno.h>

#ifdef HAVE_SYS_ERRLIST
#undef sys_errlist
#endif


The current development version looks like this:

#ifdef HAVE_SYS_ERRLIST
/* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
   might declare sys_errlist in a way that the compiler might consider
   incompatible with our later declaration, perhaps by using const
   attributes.  So we hide the declaration in errno.h (if any) using a
   macro. */
#define sys_nerr sys_nerr__
#define sys_errlist sys_errlist__
#endif

#include <stdio.h>
#include <errno.h>

#ifdef HAVE_SYS_ERRLIST
#undef sys_nerr
#undef sys_errlist
#endif

See if that fixes it (it should).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]