|
From: Paul F. <pa...@so...> - 2021-03-02 16:42:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=8fd6de1cfe5ba81307f54f441969995325eb7173 commit 8fd6de1cfe5ba81307f54f441969995325eb7173 Author: Paul Floyd <pj...@wa...> Date: Tue Mar 2 17:41:47 2021 +0100 Fix compilation on OS X Diff: --- drd/tests/swapcontext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drd/tests/swapcontext.c b/drd/tests/swapcontext.c index cfe0577a3d..cf600d4933 100644 --- a/drd/tests/swapcontext.c +++ b/drd/tests/swapcontext.c @@ -1,6 +1,7 @@ /* See also https://bugs.kde.org/show_bug.cgi?id=432381. */ #define _GNU_SOURCE +#define _XOPEN_SOURCE #include <assert.h> #include <limits.h> |
|
From: Jefferson C. <jef...@gm...> - 2021-03-02 18:51:46
|
On 3/2/2021 4:42 PM, Paul Floyd wrote: > > #define _GNU_SOURCE > +#define _XOPEN_SOURCE > > #include <assert.h> > #include <limits.h> > > Why would this fix compilation on OS X? E.g. if I'm auditing the code and trying to figure out if I can remove that line, how could I tell whether I can do so? (Commit message doesn't tell me very much) Thanks, Jefferson |
|
From: Paul F. <pj...@wa...> - 2021-03-02 19:56:13
|
On 3/2/21 7:51 PM, Jefferson Carpenter wrote: > On 3/2/2021 4:42 PM, Paul Floyd wrote: >> #define _GNU_SOURCE >> +#define _XOPEN_SOURCE >> #include <assert.h> >> #include <limits.h> >> >> > > > Why would this fix compilation on OS X? > > E.g. if I'm auditing the code and trying to figure out if I can remove > that line, how could I tell whether I can do so? (Commit message > doesn't tell me very much) > > Hi I just did what clang told me. I got a warning about a deprecated interface that said to add this define. But I'm still not done. This test now compiles and passes on Linux and FreeBSD. This change broke compilation on Solaris. So I'll be adding an include of config.h and a macro test for darwin. The test has always failed on OS X, but I'd like to at least get it to compile. A+ Paul |