This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 2/2] sparc64: move struct timeval to <sys/_timeval.h>
- From: Yaakov Selkowitz <yselkowi at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 18 Mar 2016 14:13:30 -0500
- Subject: [PATCH 2/2] sparc64: move struct timeval to <sys/_timeval.h>
- Authentication-results: sourceware.org; auth=none
- References: <1458328410-15320-1-git-send-email-yselkowi at redhat dot com>
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