seccomp: work around API breakage in libseccomp 2.4.2

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
Nikos Mavrogiannopoulos
2019-12-15 21:37:40 +01:00
parent cfa62cf6b4
commit 935818346d

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2013 Nikos Mavrogiannopoulos
* Copyright (C) 2013-2019 Nikos Mavrogiannopoulos
*
* This file is part of ocserv.
*
@@ -31,6 +31,15 @@
#include <sys/ioctl.h>
#include <errno.h>
/* libseccomp 2.4.2 broke accidentally the API. Work around it. */
#ifndef __SNR_ppoll
# ifdef __NR_ppoll
# define __SNR_ppoll __NR_ppoll
# else
# define __SNR_ppoll __PNR_ppoll
# endif
#endif
int disable_system_calls(struct worker_st *ws)
{
int ret;