1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib: Fix the build on FreeBSD

Commit 7d0981f5e7 broke the build on
FreeBSD:

[1589/3917] Compiling lib/util/util_runcmd.c
../../lib/util/util_runcmd.c:310:7: warning: implicit declaration of function 'WIFEXITED' is invalid in C99 [-Wimplicit-function-declaration]
                if (WIFEXITED(status)) {
                    ^
../../lib/util/util_runcmd.c:311:13: warning: implicit declaration of function 'WEXITSTATUS' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WEXITSTATUS(status);
                                 ^
../../lib/util/util_runcmd.c:312:14: warning: implicit declaration of function 'WIFSIGNALED' is invalid in C99 [-Wimplicit-function-declaration]
                } else if (WIFSIGNALED(status)) {
                           ^
../../lib/util/util_runcmd.c:313:13: warning: implicit declaration of function 'WTERMSIG' is invalid in C99 [-Wimplicit-function-declaration]
                        status = WTERMSIG(status);
                                 ^
4 warnings generated.

[1590/3917] Linking bin/default/source4/dsdb/libsamdb-common-samba4.so
ld: error: undefined symbol: WIFEXITED
>>> referenced by util_runcmd.c
>>>               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WEXITSTATUS
>>> referenced by util_runcmd.c
>>>               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WIFSIGNALED
>>> referenced by util_runcmd.c
>>>               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)

ld: error: undefined symbol: WTERMSIG
>>> referenced by util_runcmd.c
>>>               lib/util/util_runcmd.c.94.o:(samba_runcmd_io_handler)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 25 09:48:09 UTC 2021 on sn-devel-184
This commit is contained in:
Martin Schwenke 2021-01-23 14:10:11 +11:00 committed by Volker Lendecke
parent b9f6e25fad
commit 29503c5b99

View File

@ -27,6 +27,7 @@
#include "replace.h"
#include "system/filesys.h"
#include "system/wait.h"
#include <tevent.h>
#include "lib/util/samba_util.h"
#include "lib/util/debug.h"