2016-11-16 19:07:55

by Mikko Rapeli

[permalink] [raw]
Subject: Re: [PATCH v05 69/72] uapi rose.h: glibc netrose/rose.h header file compatibility fixes

Hi,

On Mon, Aug 29, 2016 at 12:34:25PM -0700, David Ranch wrote:
> Hello Mikko,
>
> Somewhat related, the ax25.h file from libax25-devel also has conflicts with
> the Glibc's ax.25.h. This creates trouble so if we could get a fix for
> that, that would be appreciated as well though it might be a Glibc issue and
> not a kernel issue.

I had a look at libax25 git tree and the rose.h and ax25.h there are copies
from glibc sources which in turn are modified copies from age old kernel
headers. My suggestion is on Linux platforms to use the linux kernel headers
which will co-operate nicely with glibc headers with these changes if you need
something from them which are not available in glibc headers yet.

-Mikko


2016-11-16 22:46:25

by David Ranch

[permalink] [raw]
Subject: Re: [PATCH v05 69/72] uapi rose.h: glibc netrose/rose.h header file compatibility fixes


Hello Mikko,

It would be great to see a solution to this long standing issue. I
would highlight that we have two pockets of AX.25 that need to be
considered aligned IMHO:

#Official AX.25 repo but sometimes doesn't include all available fixes
http://git.linux-ax25.org/cgit/libax25.git/tree/netax25/ax25.h

#Unofficial AX.25 repo which sometimes has more fixes
https://github.com/ve7fet/linuxax25/blob/master/libax25/netax25/ax25.h

#Current Glibc version
https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=sysdeps/unix/sysv/linux/netax25/ax25.h;hb=HEAD


Fortunately, it looks like both of these repos have the same file
(confirmed with a diff). Comparing to the Glibc versio, the differences
are minimal:


diff -u ax25.h-officialax25 ax25.h-glibc
--- ax25.h-officialax25 2016-11-16 13:53:27.000000000 -0800
+++ ax25.h-glibc 2016-11-16 14:14:03.000000000 -0800
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
@@ -12,15 +12,14 @@
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */

#ifndef _NETAX25_AX25_H
#define _NETAX25_AX25_H 1

#include <features.h>
-#include <sys/socket.h>
+#include <bits/sockaddr.h>

/* Setsockoptions(2) level. Thanks to BSD these must match
IPPROTO_xxx. */
#define SOL_AX25 257


--David