diff options
author | jirka-h <hladky.jiri@gmail.com> | 2021-03-22 01:00:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 01:00:52 +0100 |
commit | c0ee36d12a91fcfb9ec7cc4c05f514ad5ffc12c8 (patch) | |
tree | 801529f2d0b8302dac75a433458a2e1a1d289b4b | |
parent | Merge pull request #58 from texierp/topic/uclibc-fixes (diff) | |
parent | Merge branch 'master' into ps-devel-fix-uclibc-compile-001 (diff) | |
download | haveged-c0ee36d12a91fcfb9ec7cc4c05f514ad5ffc12c8.tar.xz haveged-c0ee36d12a91fcfb9ec7cc4c05f514ad5ffc12c8.zip |
Merge pull request #59 from pseiderer/ps-devel-fix-uclibc-compile-001
Check for sys/auxv.h before using it.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/haveged.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index cd3df3e..565f732 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,7 @@ AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS([sys/auxv.h]) AC_CHECK_HEADERS(sys/ioctl.h) +AC_CHECK_HEADERS(sys/auxv.h) AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/socket.h) diff --git a/src/haveged.c b/src/haveged.c index 1c22b3b..dad3072 100644 --- a/src/haveged.c +++ b/src/haveged.c @@ -19,7 +19,7 @@ ** along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" -#ifdef HAVE_SYS_AUXV_H +#if defined(HAVE_SYS_AUXV_H) #include <sys/auxv.h> #endif #include <stdlib.h> @@ -137,7 +137,7 @@ int main(int argc, char **argv) { volatile char *path = strdup(argv[0]); volatile char *arg0 = argv[0]; -#ifdef HAVE_GETAUXVAL +#if defined(HAVE_SYS_AUXV_H) if (path[0] != '/') path = (char*)getauxval(AT_EXECFN); #endif |