Peter Korsgaard
2017-Oct-30 22:45 UTC
[PATCH] openbsd-compat/bsd-getpagesize.c: include includes.h for config.h defines
The configure script checks for getpagesize() and sets HAVE_GETPAGESIZE in config.h, but bsd-getpagesize.c forgot to include includes.h (which indirectly includes config.h) so the checks always fails, causing linker issues when linking statically on systems with getpagesize(): http://autobuild.buildroot.net/results/8cc/8cc30818a400c7a392a3de787cabc9cd8425495f/build-end.log Fix it by including includes.h Signed-off-by: Peter Korsgaard <peter at korsgaard.com> --- openbsd-compat/bsd-getpagesize.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openbsd-compat/bsd-getpagesize.c b/openbsd-compat/bsd-getpagesize.c index 9daddfbd..416a8d4c 100644 --- a/openbsd-compat/bsd-getpagesize.c +++ b/openbsd-compat/bsd-getpagesize.c @@ -1,5 +1,7 @@ /* Placed in the public domain */ +#include "includes.h" + #ifndef HAVE_GETPAGESIZE #include <unistd.h> -- 2.11.0
Darren Tucker
2017-Oct-30 23:12 UTC
[PATCH] openbsd-compat/bsd-getpagesize.c: include includes.h for config.h defines
On 31 October 2017 at 09:45, Peter Korsgaard <peter at korsgaard.com> wrote:> The configure script checks for getpagesize() and sets HAVE_GETPAGESIZE in > config.h, but bsd-getpagesize.c forgot to include includes.h (which > indirectly includes config.h) so the checks always fails, causing linker > issues when linking statically on systems with getpagesize(): > > http://autobuild.buildroot.net/results/8cc/8cc30818a400c7a392a3de787cabc9 > cd8425495f/build-end.log > > Fix it by including includes.hApplied, thanks. What platform was that? I can't tell from the logs. -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Peter Korsgaard
2017-Oct-31 07:15 UTC
[PATCH] openbsd-compat/bsd-getpagesize.c: include includes.h for config.h defines
>>>>> "Darren" == Darren Tucker <dtucker at zip.com.au> writes:> On 31 October 2017 at 09:45, Peter Korsgaard <peter at korsgaard.com> wrote: >> The configure script checks for getpagesize() and sets HAVE_GETPAGESIZE in >> config.h, but bsd-getpagesize.c forgot to include includes.h (which >> indirectly includes config.h) so the checks always fails, causing linker >> issues when linking statically on systems with getpagesize(): >> >> http://autobuild.buildroot.net/results/8cc/8cc30818a400c7a392a3de787cabc9 >> cd8425495f/build-end.log >> >> Fix it by including includes.h > Applied, thanks. Great, thanks! > What platform was that? I can't tell from the logs. uClibc-ng on Linux (cross compiled for ARMv5). -- Bye, Peter Korsgaard