]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
src/privsep-linux: fix build on sparc (#26)
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 5 Feb 2021 08:25:12 +0000 (09:25 +0100)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 08:25:12 +0000 (08:25 +0000)
Fix the following build failure:

privsep-linux.c:203: warning: "AUDIT_ARCH_SPARC64" redefined
  203 | #    define AUDIT_ARCH_SPARC64
      |
In file included from privsep-linux.c:35:
/srv/storage/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/linux/audit.h:392: note: this is the location of the previous definition
  392 | #define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
      |
In file included from privsep-linux.c:36:
privsep-linux.c:215:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'?
  215 |  BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0),
      |                                      ^~~~~~~~~~~~~~~~~~

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
src/privsep-linux.c

index d00894ab21ca8dcac787d933dbcc6cee0721bf6c..5c80c1b35e17713d09e95c07caf8ee0760f6972d 100644 (file)
@@ -222,9 +222,9 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
 #  endif
 #elif defined(__sparc__)
 #  if defined(__arch64__)
-#    define AUDIT_ARCH_SPARC64
+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC64
 #  else
-#    define AUDIT_ARCH_SPARC
+#    define SECCOMP_AUDIT_ARCH AUDIT_ARCH_SPARC
 #  endif
 #elif defined(__xtensa__)
 #  define SECCOMP_AUDIT_ARCH AUDIT_ARCH_XTENSA