*/
#include "krb5.h"
+#include "port-sockets.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
main(int argc, char *argv[])
{
int sock, i;
- unsigned int len;
+ socklen_t len;
int flags = 0; /* for recvfrom() */
int on = 1;
struct servent *serv;
-#if !defined(SHARED) && !defined(_WIN32)
-
-/*
- * In this case, we just don't care about finalization. The code will still
- * define the function, but we won't do anything with it.
- */
-# define MAKE_FINI_FUNCTION(NAME) \
- static void NAME(void) UNUSED
-
-#elif defined(USE_LINKER_FINI_OPTION) || defined(_WIN32)
+#if defined(USE_LINKER_FINI_OPTION) || defined(_WIN32)
/* If we're told the linker option will be used, it doesn't really
matter what compiler we're using. Do it the same way
regardless. */
# endif
+#elif !defined(SHARED)
+
+/*
+ * In this case, we just don't care about finalization. The code will still
+ * define the function, but we won't do anything with it.
+ */
+# define MAKE_FINI_FUNCTION(NAME) \
+ static void NAME(void) UNUSED
+
#elif defined(__GNUC__) && defined(DESTRUCTOR_ATTR_WORKS)
/* If we're using gcc, if the C++ support works, the compiler should
build executables and shared libraries that support the use of
int numifs = -1;
#endif
+ *bufp = NULL;
+ *np = 0;
+
/* At least on NetBSD, an ifreq can hold an IPv4 address, but
isn't big enough for an IPv6 or ethernet address. So add a
little more space. */
#endif
{
struct ifreq *ifr, ifreq, *ifr2;
- int s, code;
+ int s;
char *buf = 0;
- size_t size, n, i, j;
+ size_t n, i, j;
int retval = 0;
#ifdef LINUX_IPV6_HACK
struct linux_ipv6_addr_list *linux_ipv6_addrs = get_linux_ipv6_addrs ();