aboutsummaryrefslogtreecommitdiffstats
path: root/main/libtirpc/0005-Fix-compile-error-IPPORT_RESERVED-undeclared.patch
blob: 4408a63d2c94a840707ab3ebe1ad1a9a7046a487 (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
From 90c2dea527d8fd95065e2a10147d050f978fe8a5 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 24 Apr 2014 08:58:20 +0200
Subject: [PATCH 5/9] Fix compile error: 'IPPORT_RESERVED' undeclared

The IPPORT_RESERVED is declared in netdb.h. This fixes the following
compile error with musl libc:

bindresvport.c: In function 'bindresvport_sa':
bindresvport.c:67:18: error: 'IPPORT_RESERVED' undeclared (first use in
this function)
 #define ENDPORT (IPPORT_RESERVED - 1)
                   ^
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 src/bindresvport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bindresvport.c b/src/bindresvport.c
index 950fbd1..2d8f2bc 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -36,6 +36,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include <netdb.h>
 #include <netinet/in.h>
 
 #include <errno.h>
-- 
2.2.0