Bug#916002: xnbd FTBFS with glibc 2.28

2019-01-12 Thread Logan Rosen
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/glibc-2.28.patch: Fix FTBFS against glibc 2.28.

Thanks for considering the patch.

Logan Rosen

-- System Information:
Debian Release: buster/sid
  APT prefers cosmic-updates
  APT policy: (500, 'cosmic-updates'), (500, 'cosmic-security'), (500, 
'cosmic'), (400, 'cosmic-proposed'), (100, 'cosmic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-13-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru xnbd-0.3.0/debian/patches/glibc-2.28.patch 
xnbd-0.3.0/debian/patches/glibc-2.28.patch
--- xnbd-0.3.0/debian/patches/glibc-2.28.patch  1969-12-31 19:00:00.0 
-0500
+++ xnbd-0.3.0/debian/patches/glibc-2.28.patch  2019-01-12 23:33:17.0 
-0500
@@ -0,0 +1,19 @@
+Description: Fix build with glibc 2.28
+Author: Logan Rosen 
+Forwarded: https://bitbucket.org/hirofuchi/xnbd/pull-requests/1
+Last-Update: 2019-01-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib/io.h
 b/lib/io.h
+@@ -35,6 +35,10 @@
+ #include 
+ #include 
+ 
++#ifdef __GNU_LIBRARY__
++#include 
++#endif
++
+ 
+ void read_all(int fd, void *buf, size_t len);
+ void write_all(int fd, const void *buf, size_t len);
diff -Nru xnbd-0.3.0/debian/patches/series xnbd-0.3.0/debian/patches/series
--- xnbd-0.3.0/debian/patches/series2013-05-20 10:47:09.0 -0400
+++ xnbd-0.3.0/debian/patches/series2019-01-12 23:32:30.0 -0500
@@ -0,0 +1 @@
+glibc-2.28.patch


Bug#916002: xnbd FTBFS with glibc 2.28

2018-12-09 Thread Adrian Bunk
Source: xnbd
Version: 0.3.0-2
Severity: serious
Tags: ftbfs buster sid

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/xnbd.html

...
io.c: In function 'get_disksize':
io.c:155:7: warning: implicit declaration of function 'major' 
[-Wimplicit-function-declaration]
   if (major(st.st_rdev) == 259)
   ^
...
/bin/bash ./libtool  --tag=CC   --mode=link gcc  -g -O2 
-ffile-prefix-map=/build/1st/xnbd-0.3.0=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra 
-Wformat=2 -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith 
-Wswitch-enum -fstack-protector -fstack-check -lgthread-2.0 -pthread -lglib-2.0 
-Wl,-z,relro -o xnbd-cachestatdump xnbd_cachestatdump.o libxnbd_internal.la 
libtool: link: gcc -g -O2 -ffile-prefix-map=/build/1st/xnbd-0.3.0=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat=2 -Wcast-align -Wwrite-strings 
-Wfloat-equal -Wpointer-arith -Wswitch-enum -fstack-protector -fstack-check 
-pthread -Wl,-z -Wl,relro -o .libs/xnbd-cachestatdump xnbd_cachestatdump.o  
-lgthread-2.0 -lglib-2.0 ./.libs/libxnbd_internal.so -pthread -Wl,-rpath 
-Wl,/usr/lib/xnbd
/usr/bin/ld: ./.libs/libxnbd_internal.so: undefined reference to `major'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:639: xnbd-cachestatdump] Error 1