aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-11-21 17:34:34 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-11-22 15:50:31 +0100
commit431793d307f564c903904d31307b730c82b6dea9 (patch)
treebfb4037bedeb5d62630ef73a6e3a4b04218fde7c
parent20468be84d98f3bcc046c4313359c07559e07d06 (diff)
csourceL add missing include and define
-rw-r--r--csource/common.go2
-rw-r--r--executor/common.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/csource/common.go b/csource/common.go
index 40f5b7ae9..76de0877e 100644
--- a/csource/common.go
+++ b/csource/common.go
@@ -3,11 +3,13 @@ package csource
var commonHeader = `
+#define _GNU_SOURCE
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <linux/capability.h>
+#include <linux/sched.h>
#include <pthread.h>
#include <setjmp.h>
#include <signal.h>
diff --git a/executor/common.h b/executor/common.h
index 62462817f..499d0076a 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -2,11 +2,13 @@
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// This file is shared between executor and csource package.
+#define _GNU_SOURCE
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <linux/capability.h>
+#include <linux/sched.h>
#include <pthread.h>
#include <setjmp.h>
#include <signal.h>