On Tue, 24 Feb 2015, Damien Miller wrote: | On Mon, 23 Feb 2015, Kevin Brott wrote: | | > | > Yup - that cleared that hurdle ... now it dies here on AIX: | > | > xlc_r -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include | > -I. -I. -O2 -qarch=ppc -qalloca -I/usr/include -I/opt/freeware/include | > -DSSHDIR=\"/usr/local/etc\" -D_PATH_SSH_PROGRAM=\"/usr/local/bin/ssh\" | > -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/local/libexec/ssh-askpass\" | > -D_PATH_SFTP_SERVER=\"/usr/local/libexec/sftp-server\" | > -D_PATH_SSH_KEY_SIGN=\"/usr/local/libexec/ssh-keysign\" | > -D_PATH_SSH_PKCS11_HELPER=\"/usr/local/libexec/ssh-pkcs11-helper\" | > -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" | > -DHAVE_CONFIG_H -o regress/netcat ./regress/netcat.c -L. -Lopenbsd-compat/ | > -L/usr/lib -L/usr/ccs/lib -blibpath:/usr/lib:/lib -lssh -lopenbsd-compat | > -lssh -lopenbsd-compat -lcrypto -lz -lpthread | > "./regress/netcat.c", line 47.10: 1506-296 (S) #include file <err.h> not | > found. | > "./regress/netcat.c", line 1334.10: 1506-296 (S) #include file <err.h> not | > found. | > make: 1254-004 The error code from the last command is 1. | > | > Is this looking for openssl's err.h or something else? if the former, | > shouldn't this be <openssl/err.h>, if the latter - not on this OS. | | This should fix it: | | diff --git a/regress/netcat.c b/regress/netcat.c [snip patch] A good start. There was a err.h further down. And Solaris 10 had a name space clash. This gets us closer but we still need to deal with SVR4 msghdr structure differences. That needs more time than I have tonight. ........ --- regress/netcat.c.old 2015-02-20 08:54:09.406208844 -0800 +++ regress/netcat.c 2015-02-23 22:35:38.154211574 -0800 @@ -44,7 +44,6 @@ #include <netinet/ip.h> #include <arpa/telnet.h> -#include <err.h> #include <errno.h> #include <netdb.h> #include <poll.h> @@ -122,6 +121,47 @@ ssize_t drainbuf(int, unsigned char *, size_t *); ssize_t fillbuf(int, unsigned char *, size_t *); +static void err(int, const char *, ...) __attribute__((format(printf, 2, 3))); +static void errx(int, const char *, ...) __attribute__((format(printf, 2, 3))); +static void warn(const char *, ...) __attribute__((format(printf, 1, 2))); + +static void +err(int r, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + fprintf(stderr, "%s: ", strerror(errno)); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); + exit(r); +} + +static void +errx(int r, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); + exit(r); +} + +static void +warn(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + fprintf(stderr, "%s: ", strerror(errno)); + vfprintf(stderr, fmt, args); + fputc('\n', stderr); + va_end(args); +} + int main(int argc, char *argv[]) { @@ -500,7 +540,7 @@ int unix_bind(char *path) { - struct sockaddr_un sun; + struct sockaddr_un sun_sa; int s; /* Create unix domain socket. */ @@ -508,17 +548,17 @@ 0)) < 0) return (-1); - memset(&sun, 0, sizeof(struct sockaddr_un)); - sun.sun_family = AF_UNIX; + memset(&sun_sa, 0, sizeof(struct sockaddr_un)); + sun_sa.sun_family = AF_UNIX; - if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >= - sizeof(sun.sun_path)) { + if (strlcpy(sun_sa.sun_path, path, sizeof(sun_sa.sun_path)) >= + sizeof(sun_sa.sun_path)) { close(s); errno = ENAMETOOLONG; return (-1); } - if (bind(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) { + if (bind(s, (struct sockaddr *)&sun_sa, SUN_LEN(&sun_sa)) < 0) { close(s); return (-1); } @@ -532,7 +572,7 @@ int unix_connect(char *path) { - struct sockaddr_un sun; + struct sockaddr_un sun_sa; int s; if (uflag) { @@ -544,16 +584,16 @@ } (void)fcntl(s, F_SETFD, FD_CLOEXEC); - memset(&sun, 0, sizeof(struct sockaddr_un)); - sun.sun_family = AF_UNIX; + memset(&sun_sa, 0, sizeof(struct sockaddr_un)); + sun_sa.sun_family = AF_UNIX; - if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >= - sizeof(sun.sun_path)) { + if (strlcpy(sun_sa.sun_path, path, sizeof(sun_sa.sun_path)) >= + sizeof(sun_sa.sun_path)) { close(s); errno = ENAMETOOLONG; return (-1); } - if (connect(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) { + if (connect(s, (struct sockaddr *)&sun_sa, SUN_LEN(&sun_sa)) < 0) { close(s); return (-1); } @@ -1331,7 +1371,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include <err.h> #include <errno.h> #include <netdb.h> #include <stdio.h> ........ -- Tim Rice Multitalents tim@xxxxxxxxxxxxxxxx _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev