diff options
author | Alan DeKok <aland@freeradius.org> | 2015-09-27 10:10:25 -0400 |
---|---|---|
committer | Alan DeKok <aland@freeradius.org> | 2015-09-27 10:10:25 -0400 |
commit | 6aecbff46e4945f0035e476a1fcd16d4713d6127 (patch) | |
tree | f8da748e895b1bae12204e5bdeedd201e3dc72bd | |
parent | c47a78f9c3f6d41de93db8bd572e985ed1c0878d (diff) | |
parent | 2943db4cc926c9e1148f0375f4b37641de36981f (diff) | |
download | libpam-radius-auth-6aecbff46e4945f0035e476a1fcd16d4713d6127.tar.gz libpam-radius-auth-6aecbff46e4945f0035e476a1fcd16d4713d6127.zip |
Merge pull request #16 from bsiegert/master
Fixes from pkgsrc patches
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/pam_radius_auth.c | 6 | ||||
-rw-r--r-- | src/pam_radius_auth.h | 2 |
4 files changed, 6 insertions, 6 deletions
@@ -5267,7 +5267,7 @@ fi HOSTINFO=$host -if test "x$werror" == "xyes"; then +if test "x$werror" = "xyes"; then CFLAGS="-Werror $CFLAGS" fi diff --git a/configure.ac b/configure.ac index e9e2092..604c868 100644 --- a/configure.ac +++ b/configure.ac @@ -363,7 +363,7 @@ dnl # Add -Werror last, so it doesn't interfere with autoconf's dnl # test programs. dnl # dnl ############################################################# -if test "x$werror" == "xyes"; then +if test "x$werror" = "xyes"; then CFLAGS="-Werror $CFLAGS" fi AC_SUBST(LIBS) diff --git a/src/pam_radius_auth.c b/src/pam_radius_auth.c index 210dbcc..694e7b4 100644 --- a/src/pam_radius_auth.c +++ b/src/pam_radius_auth.c @@ -209,7 +209,7 @@ static uint32_t ipstr2long(char *ip_str) { *ptr = '\0'; while(*ip_str != '.' && *ip_str != '\0' && count < 4) { - if (!isdigit(*ip_str)) { + if (!isdigit((unsigned char)*ip_str)) { return (uint32_t)0; } *ptr++ = *ip_str++; @@ -245,7 +245,7 @@ static int good_ipaddr(char *addr) { if (*addr == '.') { dot_count++; digit_count = 0; - } else if (!isdigit(*addr)) { + } else if (!isdigit((unsigned char)*addr)) { dot_count = 5; } else { digit_count++; @@ -298,7 +298,7 @@ static int host2server(radius_server_t *server) * If the server port hasn't already been defined, go get it. */ if (!server->port) { - if (p && isdigit(*p)) { /* the port looks like it's a number */ + if (p && isdigit((unsigned char)*p)) { /* the port looks like it's a number */ unsigned int i = atoi(p) & 0xffff; if (!server->accounting) { diff --git a/src/pam_radius_auth.h b/src/pam_radius_auth.h index 4594eef..95f262c 100644 --- a/src/pam_radius_auth.h +++ b/src/pam_radius_auth.h @@ -84,7 +84,7 @@ typedef struct radius_conf_t { *************************************************************************/ #ifndef CONST -# if defined(__sun) || defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) +# if defined(__sun) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) /* * On older versions of Solaris, you may have to change this to: * #define CONST |