[Openvpn-devel,XS] Change in openvpn[master]: Add check for nice in cmake config

Message ID 0c4e74fd006c680b5596cbe75eaa05bac1110a58-HTML@gerrit.openvpn.net
State Superseded
Headers show
Series [Openvpn-devel,XS] Change in openvpn[master]: Add check for nice in cmake config | expand

Commit Message

flichtenheld (Code Review) Nov. 20, 2023, 10:23 a.m. UTC
Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/444?usp=email

to review the following change.


Change subject: Add check for nice in cmake config
......................................................................

Add check for nice in cmake config

Change-Id: I2cc8f9b82079acca250db5871ffd9fad2997d1a8
---
M CMakeLists.txt
M config.h.cmake.in
2 files changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/44/444/1

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe9b596..f82ee96 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,6 +146,7 @@ 
 check_symbol_exists(fork unistd.h HAVE_FORK)
 check_symbol_exists(execve unistd.h HAVE_EXECVE)
 check_symbol_exists(ftruncate unistd.h HAVE_FTRUNCATE)
+check_symbol_exists(nice unistd.h HAVE_NICE)
 check_symbol_exists(setgid unistd.h HAVE_SETGID)
 check_symbol_exists(setuid unistd.h HAVE_SETUID)
 check_symbol_exists(setsid unistd.h HAVE_SETSID)
diff --git a/config.h.cmake.in b/config.h.cmake.in
index 25273ac..c1f5848 100644
--- a/config.h.cmake.in
+++ b/config.h.cmake.in
@@ -209,7 +209,7 @@ 
 #cmakedefine HAVE_NET_TUN_IF_TUN_H
 
 /* Define to 1 if you have the `nice' function. */
-#undef HAVE_NICE
+#cmakedefine HAVE_NICE
 
 /* Define to 1 if you have the `openlog' function. */
 #cmakedefine HAVE_OPENLOG