summaryrefslogtreecommitdiff
blob: 0b8318ba2fb9ab5997782c0b8da128adc00940cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 45fdc97620063be4318b9b361482fa1b5463e1d5 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 18 Nov 2019 10:14:55 +0100
Subject: [PATCH] modify_ldt: include linux/types.h before ASSEMBLY == 1

Otherwise we see a lot of:
In file included from /usr/include/bits/statx.h:30,
                 from /usr/include/sys/stat.h:446,
                 from include/files.h:3,
                 from include/shm.h:6,
                 from syscalls/x86/modify_ldt.c:12:
/usr/include/linux/stat.h:57:2: error: unknown type name '__s64'
   57 |  __s64 tv_sec;
      |  ^~~~~
/usr/include/linux/stat.h:58:2: error: unknown type name '__u32'
   58 |  __u32 tv_nsec;
      |  ^~~~~
---
 syscalls/x86/modify_ldt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/syscalls/x86/modify_ldt.c b/syscalls/x86/modify_ldt.c
index f2eaf065..0221561a 100644
--- a/syscalls/x86/modify_ldt.c
+++ b/syscalls/x86/modify_ldt.c
@@ -6,6 +6,7 @@
  */
 #include <stdlib.h>
 #include <sys/types.h>
+#include <linux/types.h> /* before __ASSEMBLY__ == 1 */
 #define __ASSEMBLY__ 1
 #include <asm/ldt.h>
 #include "sanitise.h"