depot/third_party/nixpkgs/pkgs/tools/misc/cpulimit/remove-sys-sysctl.h.patch
Default email ca5ab3a501 Project import generated by Copybara.
GitOrigin-RevId: 4a01ca36d6bfc133bc617e661916a81327c9bbc8
2022-07-14 08:49:19 -04:00

21 lines
No EOL
504 B
Diff

Remove references to sys/sysctl.h which were deprecated long ago.
diff --git a/src/cpulimit.c b/src/cpulimit.c
index 50eabea..eba4615 100644
--- a/src/cpulimit.c
+++ b/src/cpulimit.c
@@ -38,7 +38,9 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
+#ifdef __APPLE__
#include <sys/sysctl.h>
+#endif
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
-#ifdef __APPLE__ || __FREEBSD__
+#if defined(__APPLE__) || defined(__FREEBSD__)
#include <libgen.h>
#endif