]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a warning related to SCMP_CMP definition in header.
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Sep 2013 19:16:30 +0000 (15:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Sep 2013 19:16:30 +0000 (15:16 -0400)
SCMP_CMP(a,b,c) leaves the fourth field of the structure undefined,
giving a missing-initializer error.  All of our uses are
three-argument, so I'm overriding the default.

src/common/sandbox.c

index 1fd2119fa21f351791cef04d59e7dddd091a9c2f..c6c93489c8f7e15b902ddb4a348f18942fdd66b1 100644 (file)
@@ -61,6 +61,9 @@ static sandbox_cfg_t *filter_dynamic = NULL;
 /** Holds a list of pre-recorded results from getaddrinfo().*/
 static sb_addr_info_t *sb_addr_info = NULL;
 
+#undef SCMP_CMP
+#define SCMP_CMP(a,b,c) ((struct scmp_arg_cmp){(a),(b),(c),0})
+
 /** Variable used for storing all syscall numbers that will be allowed with the
  * stage 1 general Tor sandbox.
  */