summaryrefslogtreecommitdiff
blob: d9863c9280f50ad6d846acb3320247b86eacb601 (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
https://bugs.gentoo.org/581740

From 87027243d101cfa7e01d9b697f890ea7b247449b Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 9 May 2016 14:33:06 -0400
Subject: [PATCH] include sys/sysmacros.h for major

These functions are not part of any official spec, and Linux C libs have
always kept them in sys/sysmacros.h.  Include the header directly to fix
builds w/alternative C libs, and to work with future glibc versions.
---
 serial.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/serial.c b/serial.c
index d8bdd8c..b748cab 100644
--- a/serial.c
+++ b/serial.c
@@ -14,6 +14,9 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/param.h>	/* defines BSD */
+#ifdef __linux__
+#include <sys/sysmacros.h>
+#endif
 
 #include "gpsd_config.h"
 #ifdef ENABLE_BLUEZ
-- 
2.7.4