gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] ✘gpsd build broken with glibc 2.23


From: Gary E. Miller
Subject: [gpsd-dev] ✘gpsd build broken with glibc 2.23
Date: Fri, 15 Apr 2016 14:47:32 -0700

Yo All!

Dunno why, but i can't compile gpsd any more.  No recent change in the
area, must be seomthing changed on my dev host?

gcc -o gpsd -pthread gpsd.o timehint.o shmexport.o dbusexport.o -L.
-lgpsd -lgps_static -lusb-1.0 -lbluetooth -lm -lrt
-ldbus-1 ./libgpsd.a(serial.o): In function `gpsd_serial_open':
serial.c:(.text+0xbe5): undefined reference to `major' collect2: error:
ld returned 1 exit status o
serial.c last changed in January, and seems unrelated.

I suspect the problem is in serial.c on line 54:

        int devmajor = major(sb.st_rdev);

Not code I am familar with.

major() seems to come from here:

/usr/include/sys/sysmacros.h:#define major(dev) gnu_dev_major (dev)

My sysmacros.h was updated yesterday, when I went to glibc 2.23
yesterday:

-rw-r--r-- 1 root root 2278 Apr 14 15:23 /usr/include/sys/sysmacros.h

This seems to fix the build:

diff --git a/serial.c b/serial.c
index d8bdd8c..4144ac5 100644
--- a/serial.c
+++ b/serial.c
@@ -14,6 +14,7 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/param.h> /* defines BSD */
+#include <sys/sysmacros.h>     /* defines major() */
 
 #include "gpsd_config.h"
 #ifdef ENABLE_BLUEZ

Ideas anyone?  Doe my patch break any prior versions?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgp5wz4CQxWNe.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]