All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28
@ 2018-09-09  9:59 Giulio Benetti
  2018-09-09 13:19 ` Thomas Petazzoni
  2018-10-01 14:46 ` Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Giulio Benetti @ 2018-09-09  9:59 UTC (permalink / raw)
  To: buildroot

glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
and therefore <sys/sysmacros.h> must be included explicitly when
major()/minor() are used.

This commit adds a patch to directly include <sys/sysmacros.h> into
all usb_linux.c files where minor() and major() macros are used.

Fixes:
http://autobuild.buildroot.net/results/901/9011c6af71fb81988c2a05f2acee913a2bae2eff//
http://autobuild.buildroot.net/results/142/142c5672fdc44f2d68f18df3509e5051b3295df5//
http://autobuild.buildroot.net/results/b55/b55aa69654e758af5232ae69618ba1ea5c245074//

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 ...smacros.h-to-compile-with-glibc-2.28.patch | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch

diff --git a/package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch b/package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch
new file mode 100644
index 0000000000..77b457f604
--- /dev/null
+++ b/package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch
@@ -0,0 +1,42 @@
+usb_linux.c: fix minor()/major() build failure due to glibc 2.28
+
+glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
+and therefore <sys/sysmacros.h> must be included explicitly when
+major()/minor() are used.
+
+This commit adds a patch to directly include <sys/sysmacros.h> into
+all usb_linux.c files where minor() and major() macros are used.
+
+diff -urpN host-android-tools-4.2.2+git20130218.orig/core/adb/usb_linux.c host-android-tools-4.2.2+git20130218/core/adb/usb_linux.c
+--- host-android-tools-4.2.2+git20130218.orig/core/adb/usb_linux.c	2013-02-18 15:49:03.000000000 +0100
++++ host-android-tools-4.2.2+git20130218/core/adb/usb_linux.c	2018-09-09 11:47:16.476292546 +0200
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ 
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <dirent.h>
+diff -urpN host-android-tools-4.2.2+git20130218.orig/core/adbd/usb_linux.c host-android-tools-4.2.2+git20130218/core/adbd/usb_linux.c
+--- host-android-tools-4.2.2+git20130218.orig/core/adbd/usb_linux.c	2018-09-09 02:32:57.154503866 +0200
++++ host-android-tools-4.2.2+git20130218/core/adbd/usb_linux.c	2018-09-09 11:47:28.148353880 +0200
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ 
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <dirent.h>
+diff -urpN host-android-tools-4.2.2+git20130218.orig/core/fastboot/usb_linux.c host-android-tools-4.2.2+git20130218/core/fastboot/usb_linux.c
+--- host-android-tools-4.2.2+git20130218.orig/core/fastboot/usb_linux.c	2013-02-18 15:49:03.000000000 +0100
++++ host-android-tools-4.2.2+git20130218/core/fastboot/usb_linux.c	2018-09-09 11:46:53.028169154 +0200
+@@ -33,6 +33,7 @@
+ 
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <dirent.h>
+ #include <fcntl.h>
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28
  2018-09-09  9:59 [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28 Giulio Benetti
@ 2018-09-09 13:19 ` Thomas Petazzoni
  2018-09-28  7:07   ` Giulio Benetti
  2018-10-01 14:46 ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-09-09 13:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun,  9 Sep 2018 11:59:39 +0200, Giulio Benetti wrote:
> glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
> and therefore <sys/sysmacros.h> must be included explicitly when
> major()/minor() are used.
> 
> This commit adds a patch to directly include <sys/sysmacros.h> into
> all usb_linux.c files where minor() and major() macros are used.
> 
> Fixes:
> http://autobuild.buildroot.net/results/901/9011c6af71fb81988c2a05f2acee913a2bae2eff//
> http://autobuild.buildroot.net/results/142/142c5672fdc44f2d68f18df3509e5051b3295df5//
> http://autobuild.buildroot.net/results/b55/b55aa69654e758af5232ae69618ba1ea5c245074//
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> ---
>  ...smacros.h-to-compile-with-glibc-2.28.patch | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28
  2018-09-09 13:19 ` Thomas Petazzoni
@ 2018-09-28  7:07   ` Giulio Benetti
  0 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2018-09-28  7:07 UTC (permalink / raw)
  To: buildroot

Hello,

Il 09/09/2018 15:19, Thomas Petazzoni ha scritto:
> Hello,
> 
> On Sun,  9 Sep 2018 11:59:39 +0200, Giulio Benetti wrote:
>> glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
>> and therefore <sys/sysmacros.h> must be included explicitly when
>> major()/minor() are used.
>>
>> This commit adds a patch to directly include <sys/sysmacros.h> into
>> all usb_linux.c files where minor() and major() macros are used.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/901/9011c6af71fb81988c2a05f2acee913a2bae2eff//
>> http://autobuild.buildroot.net/results/142/142c5672fdc44f2d68f18df3509e5051b3295df5//
>> http://autobuild.buildroot.net/results/b55/b55aa69654e758af5232ae69618ba1ea5c245074//
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>> ---
>>   ...smacros.h-to-compile-with-glibc-2.28.patch | 42 +++++++++++++++++++
>>   1 file changed, 42 insertions(+)
>>   create mode 100644 package/android-tools/0008-Include-sysmacros.h-to-compile-with-glibc-2.28.patch
> 
> Applied to master, thanks.
> 
> Thomas
> 

This can be applied to 2018.02.x too and fixes:
http://autobuild.buildroot.net/results/84da49002f16c9b294ac8c896f53718b90543100/

-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28
  2018-09-09  9:59 [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28 Giulio Benetti
  2018-09-09 13:19 ` Thomas Petazzoni
@ 2018-10-01 14:46 ` Peter Korsgaard
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-10-01 14:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

 > glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
 > and therefore <sys/sysmacros.h> must be included explicitly when
 > major()/minor() are used.

 > This commit adds a patch to directly include <sys/sysmacros.h> into
 > all usb_linux.c files where minor() and major() macros are used.

 > Fixes:
 > http://autobuild.buildroot.net/results/901/9011c6af71fb81988c2a05f2acee913a2bae2eff//
 > http://autobuild.buildroot.net/results/142/142c5672fdc44f2d68f18df3509e5051b3295df5//
 > http://autobuild.buildroot.net/results/b55/b55aa69654e758af5232ae69618ba1ea5c245074//

 > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

Committed to 2018.02.x, 2018.05.x and 2018.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-01 14:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-09  9:59 [Buildroot] [PATCH] android-tools: fix minor()/major() build failure due to glibc 2.28 Giulio Benetti
2018-09-09 13:19 ` Thomas Petazzoni
2018-09-28  7:07   ` Giulio Benetti
2018-10-01 14:46 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.