[Git][NTPsec/ntpsec][master] getrusage() is part of POSIX/IEEE 1003.1-2004

Matt Selsky gitlab at mg.gitlab.com
Mon Dec 18 01:11:59 UTC 2017


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
374c8262 by Matt Selsky at 2017-12-17T19:57:17-05:00
getrusage() is part of POSIX/IEEE 1003.1-2004

Per http://pubs.opengroup.org/onlinepubs/009695399/functions/getrusage.html

- - - - -


2 changed files:

- ntpd/ntp_util.c
- wscript


Changes:

=====================================
ntpd/ntp_util.c
=====================================
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -22,10 +22,8 @@
 #include <sys/stat.h>
 #include <inttypes.h>
 
-#ifdef HAVE_GETRUSAGE
 #include <sys/time.h>
 #include <sys/resource.h>
-#endif
 
 /*
  * Defines used by file logging
@@ -609,7 +607,6 @@ record_sys_stats(void)
  */
 void record_use_stats(void)
 {
-#ifdef HAVE_GETRUSAGE
 	struct timespec	now;
 	struct rusage usage;
 	static struct rusage oldusage;
@@ -647,7 +644,6 @@ void record_use_stats(void)
 		oldusage = usage;
 		use_stattime = current_time;
 	}
-#endif /* HAVE_GETRUSAGE */
 }
 
 


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -641,7 +641,6 @@ int main(int argc, char **argv) {
         ('closefrom', ["stdlib.h"]),
         ('clock_gettime', ["time.h"], "RT"),
         ('clock_settime', ["time.h"], "RT"),
-        ('getrusage', ["sys/time.h", "sys/resource.h"]),
         ('ntp_adjtime', ["sys/time.h", "sys/timex.h"]),     # BSD
         ('ntp_gettime', ["sys/time.h", "sys/timex.h"]),     # BSD
         ('res_init', ["netinet/in.h", "arpa/nameser.h", "resolv.h"]),



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/374c8262e4d724b9d5e67ffa38b14b77f955bed1

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/374c8262e4d724b9d5e67ffa38b14b77f955bed1
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171218/d311b4d3/attachment.html>


More information about the vc mailing list