[PATCH 2/2] sparc64: move struct timeval to <sys/_timeval.h>

Yaakov Selkowitz yselkowi@redhat.com
Fri Mar 18 19:13:00 GMT 2016


commit bb0159489785d577ad0b8061a1ba7956ee0f89d0 moved the struct timeval
declaration from <sys/time.h> to <sys/_timeval.h>, and commit
01885f533de81ff73e9da1519a4b5f2316b49f86 changed <sys/select.h> to include
<sys/_timeval.h>.  Therefore, sparc64's own struct timeval needs to be
moved accordingly in order to avoid a conflict from the generic type.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
 newlib/libc/sys/sparc64/sys/_timeval.h | 29 +++++++++++++++++++++++++++++
 newlib/libc/sys/sparc64/sys/time.h     | 24 ------------------------
 2 files changed, 29 insertions(+), 24 deletions(-)
 create mode 100644 newlib/libc/sys/sparc64/sys/_timeval.h
 delete mode 100644 newlib/libc/sys/sparc64/sys/time.h

diff --git a/newlib/libc/sys/sparc64/sys/_timeval.h b/newlib/libc/sys/sparc64/sys/_timeval.h
new file mode 100644
index 0000000..84ee717
--- /dev/null
+++ b/newlib/libc/sys/sparc64/sys/_timeval.h
@@ -0,0 +1,29 @@
+#ifndef _SYS_TIME_H
+#define _SYS_TIME_H
+
+#include <machine/types.h>
+
+#ifndef __time_t_defined
+typedef _TIME_T_        time_t;
+#define __time_t_defined
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct timeval {
+  long tv_sec;
+  long tv_usec;
+};
+
+typedef struct timestruc {
+  time_t tv_sec;
+  long tv_nsec;
+} timestruc_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_TIME_H */
diff --git a/newlib/libc/sys/sparc64/sys/time.h b/newlib/libc/sys/sparc64/sys/time.h
deleted file mode 100644
index 853dcf1..0000000
--- a/newlib/libc/sys/sparc64/sys/time.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _SYS_TIME_H
-#define _SYS_TIME_H
-
-#include <sys/types.h>	/* for time_t */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct timeval {
-  long tv_sec;
-  long tv_usec;
-};
-
-typedef struct timestruc {
-  time_t tv_sec;
-  long tv_nsec;
-} timestruc_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_TIME_H */
-- 
2.7.0



More information about the Newlib mailing list