diff mbox

[v3,2/2] build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

Message ID 145435192737.20616.3654715232054359770.stgit@localhost
State New
Headers show

Commit Message

Lluís Vilanova Feb. 1, 2016, 6:38 p.m. UTC
This fixes double-definitions in bsd-user builds when using the UST
tracing backend (which indirectly includes the system's "syscall.h").

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 bsd-user/i386/target_syscall.h    |    4 ++++
 bsd-user/qemu.h                   |    2 +-
 bsd-user/sparc/target_syscall.h   |    5 +++++
 bsd-user/sparc64/target_syscall.h |    5 +++++
 bsd-user/x86_64/target_syscall.h  |    5 +++++
 5 files changed, 20 insertions(+), 1 deletion(-)
 rename bsd-user/i386/{syscall.h => target_syscall.h} (97%)
 rename bsd-user/sparc/{syscall.h => target_syscall.h} (62%)
 rename bsd-user/sparc64/{syscall.h => target_syscall.h} (66%)
 rename bsd-user/x86_64/{syscall.h => target_syscall.h} (97%)

Comments

Lluís Vilanova Feb. 25, 2016, 4:04 p.m. UTC | #1
Lluís Vilanova writes:

> This fixes double-definitions in bsd-user builds when using the UST
> tracing backend (which indirectly includes the system's "syscall.h").

> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

ping


> ---
>  bsd-user/i386/target_syscall.h    |    4 ++++
>  bsd-user/qemu.h                   |    2 +-
>  bsd-user/sparc/target_syscall.h   |    5 +++++
>  bsd-user/sparc64/target_syscall.h |    5 +++++
>  bsd-user/x86_64/target_syscall.h  |    5 +++++
>  5 files changed, 20 insertions(+), 1 deletion(-)
>  rename bsd-user/i386/{syscall.h => target_syscall.h} (97%)
>  rename bsd-user/sparc/{syscall.h => target_syscall.h} (62%)
>  rename bsd-user/sparc64/{syscall.h => target_syscall.h} (66%)
>  rename bsd-user/x86_64/{syscall.h => target_syscall.h} (97%)

> diff --git a/bsd-user/i386/syscall.h b/bsd-user/i386/target_syscall.h
> similarity index 97%
> rename from bsd-user/i386/syscall.h
> rename to bsd-user/i386/target_syscall.h
> index 9b34c61..82d1c58 100644
> --- a/bsd-user/i386/syscall.h
> +++ b/bsd-user/i386/target_syscall.h
> @@ -1,3 +1,6 @@
> +#ifndef TARGET_SYSCALL_H
> +#define TARGET_SYSCALL_H
> +
>  /* default linux values for the selectors */
>  #define __USER_CS	(0x23)
>  #define __USER_DS	(0x2B)
> @@ -159,3 +162,4 @@ struct target_vm86plus_struct {
 
>  #define UNAME_MACHINE "i386"
 
> +#endif  /* TARGET_SYSCALL_H */
> diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
> index 735cb40..1a361df 100644
> --- a/bsd-user/qemu.h
> +++ b/bsd-user/qemu.h
> @@ -38,7 +38,7 @@ enum BSDType {
>  extern enum BSDType bsd_type;
 
>  #include "syscall_defs.h"
> -#include "syscall.h"
> +#include "target_syscall.h"
>  #include "target_signal.h"
>  #include "exec/gdbstub.h"
 
> diff --git a/bsd-user/sparc/syscall.h b/bsd-user/sparc/target_syscall.h
> similarity index 62%
> rename from bsd-user/sparc/syscall.h
> rename to bsd-user/sparc/target_syscall.h
> index 5a9bb7e..c7eec6b 100644
> --- a/bsd-user/sparc/syscall.h
> +++ b/bsd-user/sparc/target_syscall.h
> @@ -1,3 +1,6 @@
> +#ifndef TARGET_SYSCALL_H
> +#define TARGET_SYSCALL_H
> +
>  struct target_pt_regs {
>  	abi_ulong psr;
>  	abi_ulong pc;
> @@ -7,3 +10,5 @@ struct target_pt_regs {
>  };
 
>  #define UNAME_MACHINE "sun4"
> +
> +#endif  /* TARGET_SYSCALL_H */
> diff --git a/bsd-user/sparc64/syscall.h b/bsd-user/sparc64/target_syscall.h
> similarity index 66%
> rename from bsd-user/sparc64/syscall.h
> rename to bsd-user/sparc64/target_syscall.h
> index 81a816d..2f06100 100644
> --- a/bsd-user/sparc64/syscall.h
> +++ b/bsd-user/sparc64/target_syscall.h
> @@ -1,3 +1,6 @@
> +#ifndef TARGET_SYSCALL_H
> +#define TARGET_SYSCALL_H
> +
>  struct target_pt_regs {
>  	abi_ulong u_regs[16];
>  	abi_ulong tstate;
> @@ -8,3 +11,5 @@ struct target_pt_regs {
>  };
 
>  #define UNAME_MACHINE "sun4u"
> +
> +#endif  /* TARGET_SYSCALL_H */
> diff --git a/bsd-user/x86_64/syscall.h b/bsd-user/x86_64/target_syscall.h
> similarity index 97%
> rename from bsd-user/x86_64/syscall.h
> rename to bsd-user/x86_64/target_syscall.h
> index 630514a..85a9766 100644
> --- a/bsd-user/x86_64/syscall.h
> +++ b/bsd-user/x86_64/target_syscall.h
> @@ -1,3 +1,6 @@
> +#ifndef TARGET_SYSCALL_H
> +#define TARGET_SYSCALL_H
> +
>  #define __USER_CS	(0x33)
>  #define __USER_DS	(0x2B)
 
> @@ -114,3 +117,5 @@ struct target_msqid64_ds {
>  #define TARGET_ARCH_SET_FS 0x1002
>  #define TARGET_ARCH_GET_FS 0x1003
>  #define TARGET_ARCH_GET_GS 0x1004
> +
> +#endif  /* TARGET_SYSCALL_H */
Peter Maydell Feb. 25, 2016, 4:43 p.m. UTC | #2
On 25 February 2016 at 16:04, Lluís Vilanova <vilanova@ac.upc.edu> wrote:
> Lluís Vilanova writes:
>
>> This fixes double-definitions in bsd-user builds when using the UST
>> tracing backend (which indirectly includes the system's "syscall.h").
>
>> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
>> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> ping

Applied to master, thanks.

-- PMM
diff mbox

Patch

diff --git a/bsd-user/i386/syscall.h b/bsd-user/i386/target_syscall.h
similarity index 97%
rename from bsd-user/i386/syscall.h
rename to bsd-user/i386/target_syscall.h
index 9b34c61..82d1c58 100644
--- a/bsd-user/i386/syscall.h
+++ b/bsd-user/i386/target_syscall.h
@@ -1,3 +1,6 @@ 
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 /* default linux values for the selectors */
 #define __USER_CS	(0x23)
 #define __USER_DS	(0x2B)
@@ -159,3 +162,4 @@  struct target_vm86plus_struct {
 
 #define UNAME_MACHINE "i386"
 
+#endif  /* TARGET_SYSCALL_H */
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 735cb40..1a361df 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -38,7 +38,7 @@  enum BSDType {
 extern enum BSDType bsd_type;
 
 #include "syscall_defs.h"
-#include "syscall.h"
+#include "target_syscall.h"
 #include "target_signal.h"
 #include "exec/gdbstub.h"
 
diff --git a/bsd-user/sparc/syscall.h b/bsd-user/sparc/target_syscall.h
similarity index 62%
rename from bsd-user/sparc/syscall.h
rename to bsd-user/sparc/target_syscall.h
index 5a9bb7e..c7eec6b 100644
--- a/bsd-user/sparc/syscall.h
+++ b/bsd-user/sparc/target_syscall.h
@@ -1,3 +1,6 @@ 
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong psr;
 	abi_ulong pc;
@@ -7,3 +10,5 @@  struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4"
+
+#endif  /* TARGET_SYSCALL_H */
diff --git a/bsd-user/sparc64/syscall.h b/bsd-user/sparc64/target_syscall.h
similarity index 66%
rename from bsd-user/sparc64/syscall.h
rename to bsd-user/sparc64/target_syscall.h
index 81a816d..2f06100 100644
--- a/bsd-user/sparc64/syscall.h
+++ b/bsd-user/sparc64/target_syscall.h
@@ -1,3 +1,6 @@ 
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 struct target_pt_regs {
 	abi_ulong u_regs[16];
 	abi_ulong tstate;
@@ -8,3 +11,5 @@  struct target_pt_regs {
 };
 
 #define UNAME_MACHINE "sun4u"
+
+#endif  /* TARGET_SYSCALL_H */
diff --git a/bsd-user/x86_64/syscall.h b/bsd-user/x86_64/target_syscall.h
similarity index 97%
rename from bsd-user/x86_64/syscall.h
rename to bsd-user/x86_64/target_syscall.h
index 630514a..85a9766 100644
--- a/bsd-user/x86_64/syscall.h
+++ b/bsd-user/x86_64/target_syscall.h
@@ -1,3 +1,6 @@ 
+#ifndef TARGET_SYSCALL_H
+#define TARGET_SYSCALL_H
+
 #define __USER_CS	(0x33)
 #define __USER_DS	(0x2B)
 
@@ -114,3 +117,5 @@  struct target_msqid64_ds {
 #define TARGET_ARCH_SET_FS 0x1002
 #define TARGET_ARCH_GET_FS 0x1003
 #define TARGET_ARCH_GET_GS 0x1004
+
+#endif  /* TARGET_SYSCALL_H */