Bug 7464 - struct timespec declared to late in .../source3/include/includes.h
Summary: struct timespec declared to late in .../source3/include/includes.h
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.5.3
Hardware: Other Other
: P3 normal
Target Milestone: ---
Assignee: Stefan Metzmacher
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 10:23 UTC by Joachim Schmitz (mail address dead)
Modified: 2011-06-17 07:55 UTC (History)
0 users

See Also:
bjacke: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Schmitz (mail address dead) 2010-05-27 10:23:03 UTC
struct timespec gets declared to late in .../source3/include/includes.h, had to move it to before struc stat. Patch:

diff -u ./source3/include/includes.h.orig ./source3/include/includes.h
--- ./source3/include/includes.h.orig   2010-05-17 06:51:23.000000000 -0500
+++ ./source3/include/includes.h        2010-05-26 14:32:45.000000000 -0500
@@ -430,6 +440,13 @@
 typedef long blkcnt_t;
 #endif

+#ifndef HAVE_STRUCT_TIMESPEC
+struct timespec {
+       time_t tv_sec;            /* Seconds.  */
+       long tv_nsec;           /* Nanoseconds.  */
+};
+#endif
+
 /*
  * Type for stat structure.
  */
@@ -542,13 +559,6 @@
 #  endif
 #endif

-#ifndef HAVE_STRUCT_TIMESPEC
-struct timespec {
-       time_t tv_sec;            /* Seconds.  */
-       long tv_nsec;           /* Nanoseconds.  */
-};
-#endif
-
 enum timestamp_set_resolution {
        TIMESTAMP_SET_SECONDS = 0,
        TIMESTAMP_SET_MSEC,


Bye, Jojo
Comment 1 Björn Jacke 2010-05-30 14:30:11 UTC
fixed in master by 3030d9db4ea7ddecc2e8bbef225738e0336e9be4
Comment 2 Björn Jacke 2010-05-30 14:35:12 UTC
metze, please review and reassign to Karolin for cherry-pick to 3.5
Comment 3 Joachim Schmitz (mail address dead) 2010-10-23 08:50:12 UTC
Seems this relates to Bug 7478, I don't think we need that struct if we don't have nanosleep() to use it?

Bye, Jojo
Comment 4 Björn Jacke 2011-06-17 07:47:09 UTC
cleaning up stale bug reports ... meanwhile this probably won't get fixed in 3.5. Closing as FIXED as it's fixed in 3.6.