diff -Nru dnprogs-2.60/apps/startnet.c dnprogs-2.60+x32/apps/startnet.c --- dnprogs-2.60/apps/startnet.c 2008-08-20 05:43:58.000000000 -0700 +++ dnprogs-2.60+x32/apps/startnet.c 2013-02-12 12:25:57.000000000 -0800 @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include #include diff -Nru dnprogs-2.60/debian/changelog dnprogs-2.60+x32/debian/changelog --- dnprogs-2.60/debian/changelog 2012-05-26 02:07:28.000000000 -0700 +++ dnprogs-2.60+x32/debian/changelog 2013-02-12 12:21:39.000000000 -0800 @@ -1,3 +1,10 @@ +dnprogs (2.60+x32) unreleased; urgency=low + + * Switch from using deprecated sysctl(2) to writing to /proc/sys. This + fixes a build failure on x32. + + -- Daniel Schepler Tue, 12 Feb 2013 12:21:31 -0800 + dnprogs (2.60) unstable; urgency=low * Fixed lots of Debian things that caused lintian problems and diff -Nru dnprogs-2.60/libdnet/setnodename.c dnprogs-2.60+x32/libdnet/setnodename.c --- dnprogs-2.60/libdnet/setnodename.c 2010-07-08 01:46:42.000000000 -0700 +++ dnprogs-2.60+x32/libdnet/setnodename.c 2013-02-12 12:19:05.000000000 -0800 @@ -19,28 +19,28 @@ #include #include +#include #include #ifdef __NetBSD__ #include #endif -#include #include "netdnet/dn.h" int setnodename(const char *name, size_t len) { -#if defined(SDF_UICPROXY) && defined(CTL_NET) && defined(NET_DECNET) && defined(NET_DECNET_NODE_NAME) - int ctlname[3] = { CTL_NET, NET_DECNET, NET_DECNET_NODE_NAME }; - size_t nospace = 0; - - if (len > 6) + FILE* procfile = fopen("/proc/sys/net/decnet/nodename", "w"); + if (procfile == NULL) return -1; - - return sysctl(ctlname, 3, NULL, &nospace, (void *)name, len); -#else - return -1; -#endif + if (fwrite(name, 1, len, procfile) != len) + { + fclose(procfile); + return -1; + } + if (fclose(procfile) == EOF) + return -1; + return 0; }