summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
blob: f7ac19bfd082759ef86908374eb21b09ec4f5a80 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
From 33b97e089d4a98d3acd20bd78337dd915b989bc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
Date: Fri, 5 Aug 2016 15:24:27 -0500
Subject: [PATCH] apt 1.2.12: Fix musl build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h
header so define it manually.
apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
to avoid errors in types u_int_SIZE.

Upstream-Status: Pending

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 apt-pkg/contrib/srvrec.h | 1 +
 methods/connect.cc       | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
index 01b8102..15b6875 100644
--- a/apt-pkg/contrib/srvrec.h
+++ b/apt-pkg/contrib/srvrec.h
@@ -9,6 +9,7 @@
 #ifndef SRVREC_H
 #define SRVREC_H
 
+#include <sys/types.h>
 #include <arpa/nameser.h>
 #include <vector>
 #include <string>
diff --git a/methods/connect.cc b/methods/connect.cc
index 07a730b..bb0ab5a 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -33,6 +33,9 @@
 #include <sys/socket.h>
 #include <arpa/inet.h>
 #include <netdb.h>
+#ifndef AI_IDN
+#define AI_IDN 0x0040
+#endif
 
 #include "connect.h"
 #include "rfc2553emu.h"
-- 
2.1.4