hc
2024-11-01 a01b5c9f91adaee088a817861603a5dbe14775c2
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 1d5a2e0f88e0c53fede03632fa92ffade5e79ac5 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 11 Apr 2021 10:04:59 +0200
Subject: [PATCH] fix build on musl
 
Build on musl is broken since version 1.7.1 and commit
a1f20223cfcf7b9eae8c9e7e7a07e7bf1377f65b:
 
libbridge_devif.c: In function 'fpopen':
libbridge_devif.c:33:12: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'?
   33 |  char path[PATH_MAX];
      |            ^~~~~~~~
      |            AF_MAX
 
Fixes:
 - http://autobuild.buildroot.org/results/0f080ff6913595ee2732b93206e5001c837c1bcc
 
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: sent to Stephen Hemminger <sthemmin@microsoft.com>]
---
 libbridge/libbridge_devif.c | 1 +
 libbridge/libbridge_init.c  | 1 +
 2 files changed, 2 insertions(+)
 
diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c
index 8b7d954..6c679f6 100644
--- a/libbridge/libbridge_devif.c
+++ b/libbridge/libbridge_devif.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
+#include <limits.h>
 #include <string.h>
 #include <dirent.h>
 #include <fcntl.h>
diff --git a/libbridge/libbridge_init.c b/libbridge/libbridge_init.c
index c914971..83a97cd 100644
--- a/libbridge/libbridge_init.c
+++ b/libbridge/libbridge_init.c
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
+#include <limits.h>
 #include <string.h>
 #include <dirent.h>
 #include <sys/types.h>
-- 
2.30.2