aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dma/musl-fixes.patch
blob: bf7d805b2f4ecc78b7b822d011273878d02c6a15 (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
31
32
33
34
35
36
37
diff -upr dma-0.11.orig/dfcompat.c dma-0.11/dfcompat.c
--- dma-0.11.orig/dfcompat.c	2016-02-29 15:33:18.153280618 +0100
+++ dma-0.11/dfcompat.c	2016-02-29 15:33:25.749914514 +0100
@@ -105,7 +105,7 @@ reallocf(void *ptr, size_t size)
 
 #ifndef HAVE_GETPROGNAME
 
-#ifdef __GLIBC__
+#ifdef __linux__
 
 #include <errno.h>
 
diff -upr dma-0.11.orig/dma.h dma-0.11/dma.h
--- dma-0.11.orig/dma.h	2016-02-29 15:33:18.153280618 +0100
+++ dma-0.11/dma.h	2016-02-29 15:33:25.749914514 +0100
@@ -38,7 +38,7 @@
 #define DMA_H
 
 #include <sys/types.h>
-#include <sys/queue.h>
+#include <bsd/sys/queue.h>
 #include <sys/socket.h>
 #include <arpa/nameser.h>
 #include <arpa/inet.h>
diff -upr dma-0.11.orig/dns.c dma-0.11/dns.c
--- dma-0.11.orig/dns.c	2016-02-29 15:33:18.153280618 +0100
+++ dma-0.11/dns.c	2016-02-29 15:33:30.979891954 +0100
@@ -44,6 +44,9 @@
 #include <stdlib.h>
 
 #include "dma.h"
+#ifndef roundup
+#define roundup(x, y)  ((((x) + ((y) - 1)) / (y)) * (y))
+#endif
 
 static int
 sort_pref(const void *a, const void *b)