summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Gomez <[email protected]>2018-07-19 15:33:33 +0300
committerAndres Gomez <[email protected]>2018-07-24 19:52:11 +0300
commit3647b16675f98577e19674ff25a9136ad3af8f73 (patch)
treee686309b5e2933a8f6dcc429158aea0de1c00843
parent7665a05a3aff039d17c5741f1c6a98ae79608c51 (diff)
travis: manually generate sys/syscall.h
Until now, the needed bits were wrongly included in linux/memfd.h Since Travis' sys/syscall.h doesn't provide the SYS_memfd_create, we generate that header manually, including the needed bits to avoid compilation problems, as the ones observed after: 3228335b55c ("intel: aubinator: handle GGTT mappings") v2: replace fixes commit with the first direct user of syscall.h (Emil). Fixes: 3228335b55c ("intel: aubinator: handle GGTT mappings") Cc: Emil Velikov <[email protected]> Cc: Juan A. Suarez Romero <[email protected]> Cc: Dylan Baker <[email protected]> Cc: Eric Engestrom <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Acked-by: Eric Engestrom <[email protected]>
-rw-r--r--.travis.yml27
1 files changed, 24 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 012cc9139e0..8b1730bec69 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -584,13 +584,34 @@ install:
"#ifndef _LINUX_MEMFD_H" \
"#define _LINUX_MEMFD_H" \
"" \
- "#define __NR_memfd_create 319" \
- "#define SYS_memfd_create __NR_memfd_create" \
- "" \
"#define MFD_CLOEXEC 0x0001U" \
"#define MFD_ALLOW_SEALING 0x0002U" \
"" \
"#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
+
+ # Generate this header, including the missing SYS_memfd_create
+ # macro, which is not provided by the header in the Travis
+ # instance
+ mkdir -p sys
+ printf "%s\n" \
+ "#ifndef _SYSCALL_H" \
+ "#define _SYSCALL_H 1" \
+ "" \
+ "#include <asm/unistd.h>" \
+ "" \
+ "#ifndef _LIBC" \
+ "# include <bits/syscall.h>" \
+ "#endif" \
+ "" \
+ "#ifndef __NR_memfd_create" \
+ "# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
+ "#endif" \
+ "" \
+ "#ifndef SYS_memfd_create" \
+ "# define SYS_memfd_create __NR_memfd_create" \
+ "#endif" \
+ "" \
+ "#endif" > sys/syscall.h
fi
script: