From: Stas Boukarev Date: Mon, 4 Feb 2013 12:06:22 +0000 (+0400) Subject: Build on newer glibc. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=140ee89d7fda85ad1c1d7273425f23f54855f0ec;p=sbcl.git Build on newer glibc. Newer glibc don't like the usage of #define __USE_GNU, use _GNU_SOURCE instead. Fixes lp#1095036 --- diff --git a/NEWS b/NEWS index 2ac0eb7..057fefa 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,8 @@ changes relative to sbcl-1.1.4: * enhancement: SB-POSIX now provides MAP-ANON. * bug fix: no more unused variable style warnings from RESTART-CASE macroexpansion (lp#1113859) + * bug fix: no more unused variable style warnings when loading + sb-bsd-sockets.asd (lp#1114681) * bug fix: deleting a package removes it from implementation-package lists of other packages. * bug fix: SB-SPROF:WITH-PROFILING is now usable in the Slime REPL on Darwin. @@ -33,6 +35,7 @@ changes relative to sbcl-1.1.4: * bug fix: (setf (documentation 'x 'function)) and (setf (documentation #'x t)) set documentation in different places. (regression since 1.0.43.63) + * bug fix: build on newer glibc. (lp#1095036) changes in sbcl-1.1.4 relative to sbcl-1.1.3: * optimization: LOOP expressions using "of-type character" have slightly diff --git a/src/runtime/backtrace.c b/src/runtime/backtrace.c index c618ca7..5585122 100644 --- a/src/runtime/backtrace.c +++ b/src/runtime/backtrace.c @@ -13,6 +13,9 @@ * files for more information. */ +/* needed if we want dladdr() and Dl_Info from glibc's dlfcn.h */ +#define _GNU_SOURCE + #include #include #include "sbcl.h" @@ -34,11 +37,7 @@ #include "thread.h" #ifdef LISP_FEATURE_OS_PROVIDES_DLADDR -# ifndef __USE_GNU -/* __USE_GNU needed if we want dladdr() and Dl_Info from glibc. */ -# define __USE_GNU -# endif -# include "dlfcn.h" +# include #endif #if !(defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)) diff --git a/src/runtime/os-common.c b/src/runtime/os-common.c index c5e082f..f57b643 100644 --- a/src/runtime/os-common.c +++ b/src/runtime/os-common.c @@ -8,7 +8,7 @@ * provided with absolutely no warranty. See the COPYING and CREDITS * files for more information. */ - +# define _GNU_SOURCE /* needed for RTLD_DEFAULT from dlfcn.h */ #include #include #include @@ -27,7 +27,6 @@ #include "os.h" #include "interr.h" #if defined(LISP_FEATURE_OS_PROVIDES_DLOPEN) && !defined(LISP_FEATURE_WIN32) -# define __USE_GNU /* needed for RTLD_DEFAULT */ # include #endif diff --git a/src/runtime/x86-64-linux-os.c b/src/runtime/x86-64-linux-os.c index d3d2c30..e012289 100644 --- a/src/runtime/x86-64-linux-os.c +++ b/src/runtime/x86-64-linux-os.c @@ -14,6 +14,8 @@ * files for more information. */ +#define _GNU_SOURCE /* for REG_RAX etc. from sys/ucontext */ + #include #include #include @@ -22,10 +24,7 @@ #include #include -#define __USE_GNU #include -#undef __USE_GNU - #include "./signal.h" #include "os.h"