summaryrefslogtreecommitdiff
path: root/multimedia/minidlna/patches/patch-image_utils.c
blob: 96aea5559b09e6a3941e40de35247f83256c12fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-image_utils.c,v 1.1 2012/10/15 22:48:02 drochner Exp $

--- image_utils.c.orig	2012-10-15 19:04:54.000000000 +0000
+++ image_utils.c
@@ -32,17 +32,25 @@
 #include <unistd.h>
 #include <setjmp.h>
 #include <jpeglib.h>
+#ifdef __NetBSD__
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 
 #include "upnpreplyparse.h"
 #include "image_utils.h"
 #include "log.h"
 
+#ifdef __NetBSD__
+#define SWAP16(w) htobe16(w)
+#else
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 # define SWAP16(w) ( (((w) >> 8) & 0x00ff) | (((w) << 8) & 0xff00) )
 #else
 # define SWAP16(w) (w)
 #endif
+#endif /* NetBSD */
 
 #define JPEG_QUALITY  96