[Pkg-xfce-devel] Bug#404120: xfce4-wavelan-plugin: FTBFS on
GNU/kFreeBSD
Petr Salinger
Petr.Salinger at seznam.cz
Thu Dec 21 20:11:11 UTC 2006
Package: xfce4-wavelan-plugin
Severity: important
Version: 0.5.3-1
Tags: patch
Hi,
the current version fails to build on GNU/kFreeBSD.
It needs small porting, see attached patch.
It would also be nice if you can ask upstream
to include this changes.
Thanks in advance
Petr
-------------- next part --------------
--- panel-plugin/wi_bsd.c.STD 2006-12-21 21:25:27.000000000 +0100
+++ panel-plugin/wi_bsd.c 2006-12-21 21:39:23.000000000 +0100
@@ -24,7 +24,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
#include <sys/types.h>
#include <sys/cdefs.h>
@@ -35,7 +35,7 @@
#include <net/if.h>
#include <net/if_media.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <net/if_var.h>
#include <net/ethernet.h>
@@ -62,6 +62,22 @@
#endif
#endif
+#if defined(__GLIBC__)
+
+#define strlcpy(dst, src, size) g_strlcpy(dst, src, size)
+
+#include <byteswap.h>
+#include <endian.h>
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define le16toh(x) ((uint16_t)(x))
+#elif __BYTE_ORDER == __BIG_ENDIAN
+#define le16toh(x) bswap16((x))
+#else
+#error unknown ENDIAN
+#endif
+
+#endif /* __GLIBC__ */
+
#include <stdio.h>
#include <string.h>
#include <ctype.h>
More information about the Pkg-xfce-devel
mailing list