retitle 954294 libseccomp-dev: API break: SCMP_SYS() is unsigned long
tags 954294 + patch
thanks

> Nevermind, I found the real culprit. SCMP_SYS() is defined to return int.

Patch attached. Please apply and upload, and forward this upstream.

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg

**********

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**********
Author: mirabilos <t...@debian.org>
Description: Fix the return value of SCMP_SYS, it’s documented to be int
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954294

--- a/include/seccomp.h
+++ b/include/seccomp.h
@@ -197,7 +197,7 @@ struct scmp_arg_cmp {
  * Convert a syscall name into the associated syscall number
  * @param x the syscall name
  */
-#define SCMP_SYS(x)		(__SNR_##x)
+#define SCMP_SYS(x)		((int)__SNR_##x)
 
 /* Helpers for the argument comparison macros, DO NOT USE directly */
 #define _SCMP_VA_NUM_ARGS(...)	_SCMP_VA_NUM_ARGS_IMPL(__VA_ARGS__,2,1)
--- a/include/seccomp.h.in
+++ b/include/seccomp.h.in
@@ -209,7 +209,7 @@ struct scmp_arg_cmp {
  * Convert a syscall name into the associated syscall number
  * @param x the syscall name
  */
-#define SCMP_SYS(x)		(__SNR_##x)
+#define SCMP_SYS(x)		((int)__SNR_##x)
 
 /* Helpers for the argument comparison macros, DO NOT USE directly */
 #define _SCMP_VA_NUM_ARGS(...)	_SCMP_VA_NUM_ARGS_IMPL(__VA_ARGS__,2,1)

Reply via email to