Control: tag -1 patch Hi,
Please use attached patch. On 25/01/2014 22:02, Julien Cristau wrote: > Source: smartmontools > Version: 6.2+svn3841-1 > Severity: serious > Justification: fails to build from source (but built successfully in the past) > Control: block 728919 with -1 > > Hi, > > during a binNMU smartmontools failed to build, see the logs at > https://buildd.debian.org/status/package.php?p=smartmontools > >> g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' >> -DSMARTMONTOOLS_SYSCONFDIR='"/etc"' >> -DSMARTMONTOOLS_DRIVEDBDIR='"/var/lib/smartmontools/drivedb"' >> -DSMARTMONTOOLS_SAVESTATES='"/var/lib/smartmontools/smartd."' >> -DSMARTMONTOOLS_ATTRIBUTELOG='"/var/lib/smartmontools/attrlog."' -g -O2 >> -Wall -W -MT cciss.o -MD -MP -MF .deps/cciss.Tpo -c -o cciss.o cciss.cpp >> cciss.cpp:28:29: fatal error: bsd/sys/cdefs.h: No such file or directory >> # include <bsd/sys/cdefs.h> >> ^ >> compilation terminated. >> make[2]: *** [cciss.o] Error 1 > > Cheers, > Julien > -- Robert Millan
diff -ur smartmontools-6.2+svn3841/cciss.cpp smartmontools-6.2+svn3841.kfreebsd/cciss.cpp --- smartmontools-6.2+svn3841/cciss.cpp 2012-07-20 19:26:32.000000000 +0200 +++ smartmontools-6.2+svn3841.kfreebsd/cciss.cpp 2014-01-25 22:53:37.862197216 +0100 @@ -18,18 +18,10 @@ # ifndef be32toh # define be32toh __be32_to_cpu # endif -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) # include <sys/endian.h> # include CISS_LOCATION # define _HAVE_CCISS -#elif defined(__FreeBSD_kernel__) -# include <endian.h> -# ifdef __GLIBC__ -# include <bsd/sys/cdefs.h> -# include <stdint.h> -# endif -# include CISS_LOCATION -# define _HAVE_CCISS #endif #ifdef _HAVE_CCISS Només a smartmontools-6.2+svn3841.kfreebsd: config.guess Només a smartmontools-6.2+svn3841.kfreebsd: config.h.in Només a smartmontools-6.2+svn3841.kfreebsd: config.sub diff -ur smartmontools-6.2+svn3841/debian/control smartmontools-6.2+svn3841.kfreebsd/debian/control --- smartmontools-6.2+svn3841/debian/control 2013-09-05 14:53:56.000000000 +0200 +++ smartmontools-6.2+svn3841.kfreebsd/debian/control 2014-01-25 22:58:58.623197289 +0100 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Giuseppe Iuculano <iucul...@debian.org> Uploaders: Florian Maier <cont...@marsmenschen.com> -Build-Depends: debhelper (>= 7), libcam-dev [kfreebsd-i386 kfreebsd-amd64], automake1.10, autoconf, libcap-ng-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !sparc !avr32], libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libusb2-dev [kfreebsd-i386 kfreebsd-amd64], hardening-wrapper +Build-Depends: debhelper (>= 7), libcam-dev [kfreebsd-any], freebsd-glue [kfreebsd-any], automake1.10, autoconf, libcap-ng-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !sparc !avr32], libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libusb2-dev [kfreebsd-i386 kfreebsd-amd64], hardening-wrapper Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/collab-maint/smartmontools.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/smartmontools.git diff -ur smartmontools-6.2+svn3841/debian/patches/kfreebsd.patch smartmontools-6.2+svn3841.kfreebsd/debian/patches/kfreebsd.patch --- smartmontools-6.2+svn3841/debian/patches/kfreebsd.patch 2013-09-05 14:53:56.000000000 +0200 +++ smartmontools-6.2+svn3841.kfreebsd/debian/patches/kfreebsd.patch 2014-01-25 23:11:18.898197171 +0100 @@ -1,7 +1,5 @@ -Index: smartmontools/dev_areca.h -=================================================================== ---- smartmontools.orig/dev_areca.h 2013-09-05 13:31:22.863972312 +0200 -+++ smartmontools/dev_areca.h 2013-09-05 13:34:00.587972763 +0200 +--- a/dev_areca.h ++++ b/dev_areca.h @@ -58,7 +58,7 @@ #define ARCMSR_IOCTL_CLEAR_RQBUFFER (ARECA_SATA_RAID | FUNCTION_CLEAR_RQBUFFER) #define ARCMSR_IOCTL_CLEAR_WQBUFFER (ARECA_SATA_RAID | FUNCTION_CLEAR_WQBUFFER) @@ -11,3 +9,25 @@ #include <sys/ioctl.h> // _IOWR /*FunctionCode*/ +--- a/cciss.cpp ++++ b/cciss.cpp +@@ -18,18 +18,10 @@ + # ifndef be32toh + # define be32toh __be32_to_cpu + # endif +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + # include <sys/endian.h> + # include CISS_LOCATION + # define _HAVE_CCISS +-#elif defined(__FreeBSD_kernel__) +-# include <endian.h> +-# ifdef __GLIBC__ +-# include <bsd/sys/cdefs.h> +-# include <stdint.h> +-# endif +-# include CISS_LOCATION +-# define _HAVE_CCISS + #endif + + #ifdef _HAVE_CCISS diff -ur smartmontools-6.2+svn3841/debian/rules smartmontools-6.2+svn3841.kfreebsd/debian/rules --- smartmontools-6.2+svn3841/debian/rules 2013-09-05 14:53:56.000000000 +0200 +++ smartmontools-6.2+svn3841.kfreebsd/debian/rules 2014-01-25 23:10:06.072200351 +0100 @@ -14,6 +14,10 @@ CONFIGURE_ARGS += --with-selinux endif +ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) + CFLAGS += -I/usr/include/freebsd +endif + CFLAGS += -fsigned-char -Wall ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 @@ -44,7 +48,7 @@ configure-stamp: dh_testdir ./autogen.sh - CFLAGS="${CFLAGS}" ./configure --prefix=/usr \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-initscriptdir=no \ Només a smartmontools-6.2+svn3841.kfreebsd: depcomp Només a smartmontools-6.2+svn3841.kfreebsd: install-sh Només a smartmontools-6.2+svn3841.kfreebsd: m4 Només a smartmontools-6.2+svn3841.kfreebsd: missing Només a smartmontools-6.2+svn3841.kfreebsd/.pc/kfreebsd.patch: cciss.cpp Només a smartmontools-6.2+svn3841.kfreebsd/.pc/kfreebsd.patch: .timestamp