Skip to content

Commit

Permalink
Merge pull request #59 from pseiderer/ps-devel-fix-uclibc-compile-001
Browse files Browse the repository at this point in the history
Check for sys/auxv.h before using it.
  • Loading branch information
jirka-h committed Mar 22, 2021
2 parents 76da163 + 5cdd805 commit c0ee36d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/haveged.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c0ee36d

Please sign in to comment.