Fri 27 Jul 23:51:24 BST 2018: starting build of mac-fdisk version 0.1-18 on maul W: Download is performed unsandboxed as root as file 'mac-fdisk_0.1-18.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) W: /root/.pbuilderrc does not exist I: using fakeroot in build. I: pbuilder: network access will be disabled during build I: Current time: Fri Jul 27 23:51:25 BST 2018 I: pbuilder-time-stamp: 1532731885 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-armhf.tgz] I: copying local configuration I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: Mounting /dev I: Mounting /proc I: Mounting /sys I: policy-rc.d already exists I: Obtaining the cached apt archive contents I: Copying source file I: copying [mac-fdisk_0.1-18.dsc] I: copying [./mac-fdisk_0.1.orig.tar.gz] I: copying [./mac-fdisk_0.1-18.diff.gz] I: Extracting source gpgv: unknown type of key resource 'trustedkeys.kbx' gpgv: keyblock resource '/root/.gnupg/trustedkeys.kbx': General error gpgv: Signature made Mon Sep 25 09:04:26 2017 UTC gpgv: using RSA key 62FF8A7584E029569546000674263B37F5B5F913 gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on ./mac-fdisk_0.1-18.dsc dpkg-source: info: extracting mac-fdisk in mac-fdisk-0.1 dpkg-source: info: unpacking mac-fdisk_0.1.orig.tar.gz dpkg-source: info: applying mac-fdisk_0.1-18.diff.gz dpkg-source: info: upstream files that have been modified: mac-fdisk-0.1/Makefile mac-fdisk-0.1/dpme.h mac-fdisk-0.1/dump.c mac-fdisk-0.1/fdisk.c mac-fdisk-0.1/fdisklabel.c mac-fdisk-0.1/fdisklabel.h mac-fdisk-0.1/io.c mac-fdisk-0.1/kernel-defs.h mac-fdisk-0.1/mac-fdisk.8.in mac-fdisk-0.1/partition_map.c mac-fdisk-0.1/partition_map.h mac-fdisk-0.1/pdisk.c mac-fdisk-0.1/pmac-fdisk.8.in I: Installing the build-deps -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: armhf Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 11759 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper; however: Package debhelper is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdmainutils{a} debhelper{a} dh-autoreconf{a} dh-strip-nondeterminism{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} intltool-debian{a} libarchive-zip-perl{a} libbsd0{a} libcroco3{a} libelf1{a} libfile-stripnondeterminism-perl{a} libfreetype6{a} libglib2.0-0{a} libgraphite2-3{a} libharfbuzz0b{a} libicu-le-hb0{a} libicu60{a} libmagic-mgc{a} libmagic1{a} libncurses6{a} libpipeline1{a} libpng16-16{a} libsigsegv2{a} libtimedate-perl{a} libtool{a} libxml2{a} m4{a} man-db{a} po-debconf{a} The following packages are RECOMMENDED but will NOT be installed: curl libarchive-cpio-perl libglib2.0-data libgpm2 libltdl-dev libmail-sendmail-perl lynx shared-mime-info wget xdg-user-dirs 0 packages upgraded, 37 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/21.3 MB of archives. After unpacking 66.3 MB will be used. Writing extended state information... debconf: delaying package configuration, since apt-utils is not installed E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device) Selecting previously unselected package libbsd0:armhf. (Reading database ... 11759 files and directories currently installed.) Preparing to unpack .../00-libbsd0_0.9.1-1_armhf.deb ... Unpacking libbsd0:armhf (0.9.1-1) ... Selecting previously unselected package bsdmainutils. Preparing to unpack .../01-bsdmainutils_11.1.2+b1_armhf.deb ... Unpacking bsdmainutils (11.1.2+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../02-groff-base_1.22.3-10_armhf.deb ... Unpacking groff-base (1.22.3-10) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../03-libpipeline1_1.5.0-1_armhf.deb ... Unpacking libpipeline1:armhf (1.5.0-1) ... Selecting previously unselected package man-db. Preparing to unpack .../04-man-db_2.8.3-2_armhf.deb ... Unpacking man-db (2.8.3-2) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../05-libmagic-mgc_1%3a5.33-3_armhf.deb ... Unpacking libmagic-mgc (1:5.33-3) ... Selecting previously unselected package libmagic1:armhf. Preparing to unpack .../06-libmagic1_1%3a5.33-3_armhf.deb ... Unpacking libmagic1:armhf (1:5.33-3) ... Selecting previously unselected package file. Preparing to unpack .../07-file_1%3a5.33-3_armhf.deb ... Unpacking file (1:5.33-3) ... Selecting previously unselected package gettext-base. Preparing to unpack .../08-gettext-base_0.19.8.1-6+b1_armhf.deb ... Unpacking gettext-base (0.19.8.1-6+b1) ... Selecting previously unselected package libsigsegv2:armhf. Preparing to unpack .../09-libsigsegv2_2.12-2_armhf.deb ... Unpacking libsigsegv2:armhf (2.12-2) ... Selecting previously unselected package m4. Preparing to unpack .../10-m4_1.4.18-1_armhf.deb ... Unpacking m4 (1.4.18-1) ... Selecting previously unselected package autoconf. Preparing to unpack .../11-autoconf_2.69-11_all.deb ... Unpacking autoconf (2.69-11) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../12-autotools-dev_20180224.1_all.deb ... Unpacking autotools-dev (20180224.1) ... Selecting previously unselected package automake. Preparing to unpack .../13-automake_1%3a1.15.1-3.1_all.deb ... Unpacking automake (1:1.15.1-3.1) ... Selecting previously unselected package autopoint. Preparing to unpack .../14-autopoint_0.19.8.1-6_all.deb ... Unpacking autopoint (0.19.8.1-6) ... Selecting previously unselected package libtool. Preparing to unpack .../15-libtool_2.4.6-2.1_all.deb ... Unpacking libtool (2.4.6-2.1) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../16-dh-autoreconf_19_all.deb ... Unpacking dh-autoreconf (19) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../17-libarchive-zip-perl_1.60-1_all.deb ... Unpacking libarchive-zip-perl (1.60-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../18-libfile-stripnondeterminism-perl_0.042-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (0.042-1) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../19-libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../20-dh-strip-nondeterminism_0.042-1_all.deb ... Unpacking dh-strip-nondeterminism (0.042-1) ... Selecting previously unselected package libelf1:armhf. Preparing to unpack .../21-libelf1_0.170-0.5_armhf.deb ... Unpacking libelf1:armhf (0.170-0.5) ... Selecting previously unselected package dwz. Preparing to unpack .../22-dwz_0.12-2_armhf.deb ... Unpacking dwz (0.12-2) ... Selecting previously unselected package libglib2.0-0:armhf. Preparing to unpack .../23-libglib2.0-0_2.56.1-2_armhf.deb ... Unpacking libglib2.0-0:armhf (2.56.1-2) ... Selecting previously unselected package libpng16-16:armhf. Preparing to unpack .../24-libpng16-16_1.6.34-2_armhf.deb ... Unpacking libpng16-16:armhf (1.6.34-2) ... Selecting previously unselected package libfreetype6:armhf. Preparing to unpack .../25-libfreetype6_2.8.1-2_armhf.deb ... Unpacking libfreetype6:armhf (2.8.1-2) ... Selecting previously unselected package libgraphite2-3:armhf. Preparing to unpack .../26-libgraphite2-3_1.3.11-2_armhf.deb ... Unpacking libgraphite2-3:armhf (1.3.11-2) ... Selecting previously unselected package libharfbuzz0b:armhf. Preparing to unpack .../27-libharfbuzz0b_1.8.2-2_armhf.deb ... Unpacking libharfbuzz0b:armhf (1.8.2-2) ... Selecting previously unselected package libicu-le-hb0:armhf. Preparing to unpack .../28-libicu-le-hb0_1.0.3+git161113-5_armhf.deb ... Unpacking libicu-le-hb0:armhf (1.0.3+git161113-5) ... Selecting previously unselected package libicu60:armhf. Preparing to unpack .../29-libicu60_60.2-6_armhf.deb ... Unpacking libicu60:armhf (60.2-6) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../30-libxml2_2.9.4+dfsg1-7+b1_armhf.deb ... Unpacking libxml2:armhf (2.9.4+dfsg1-7+b1) ... Selecting previously unselected package libcroco3:armhf. Preparing to unpack .../31-libcroco3_0.6.12-2_armhf.deb ... Unpacking libcroco3:armhf (0.6.12-2) ... Selecting previously unselected package libncurses6:armhf. Preparing to unpack .../32-libncurses6_6.1+20180210-4_armhf.deb ... Unpacking libncurses6:armhf (6.1+20180210-4) ... Selecting previously unselected package gettext. Preparing to unpack .../33-gettext_0.19.8.1-6+b1_armhf.deb ... Unpacking gettext (0.19.8.1-6+b1) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../34-intltool-debian_0.35.0+20060710.4_all.deb ... Unpacking intltool-debian (0.35.0+20060710.4) ... Selecting previously unselected package po-debconf. Preparing to unpack .../35-po-debconf_1.0.20_all.deb ... Unpacking po-debconf (1.0.20) ... Selecting previously unselected package debhelper. Preparing to unpack .../36-debhelper_11.3.5_all.deb ... Unpacking debhelper (11.3.5) ... Setting up libarchive-zip-perl (1.60-1) ... Setting up libpng16-16:armhf (1.6.34-2) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libsigsegv2:armhf (2.12-2) ... Setting up libelf1:armhf (0.170-0.5) ... Setting up groff-base (1.22.3-10) ... Setting up libglib2.0-0:armhf (2.56.1-2) ... No schema files found: doing nothing. Setting up gettext-base (0.19.8.1-6+b1) ... Setting up libpipeline1:armhf (1.5.0-1) ... Setting up m4 (1.4.18-1) ... Setting up libbsd0:armhf (0.9.1-1) ... Setting up libfreetype6:armhf (2.8.1-2) ... Setting up libmagic-mgc (1:5.33-3) ... Setting up libmagic1:armhf (1:5.33-3) ... Setting up libgraphite2-3:armhf (1.3.11-2) ... Processing triggers for libc-bin (2.27-4) ... Setting up dwz (0.12-2) ... Setting up autotools-dev (20180224.1) ... Setting up bsdmainutils (11.1.2+b1) ... update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode Setting up libncurses6:armhf (6.1+20180210-4) ... Setting up autopoint (0.19.8.1-6) ... Setting up libfile-stripnondeterminism-perl (0.042-1) ... Setting up libharfbuzz0b:armhf (1.8.2-2) ... Setting up autoconf (2.69-11) ... Setting up file (1:5.33-3) ... Setting up automake (1:1.15.1-3.1) ... update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode Setting up man-db (2.8.3-2) ... Building database of manual pages ... Setting up libtool (2.4.6-2.1) ... Setting up libicu-le-hb0:armhf (1.0.3+git161113-5) ... Setting up libicu60:armhf (60.2-6) ... Setting up libxml2:armhf (2.9.4+dfsg1-7+b1) ... Setting up libcroco3:armhf (0.6.12-2) ... Setting up gettext (0.19.8.1-6+b1) ... Setting up intltool-debian (0.35.0+20060710.4) ... Setting up po-debconf (1.0.20) ... Setting up debhelper (11.3.5) ... Setting up dh-autoreconf (19) ... Setting up dh-strip-nondeterminism (0.042-1) ... Processing triggers for libc-bin (2.27-4) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libfakeroot The following NEW packages will be installed: fakeroot libfakeroot debconf: delaying package configuration, since apt-utils is not installed 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/126 kB of archives. After this operation, 307 kB of additional disk space will be used. E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device) Selecting previously unselected package libfakeroot:armhf. (Reading database ... 13851 files and directories currently installed.) Preparing to unpack .../libfakeroot_1.23-1_armhf.deb ... Unpacking libfakeroot:armhf (1.23-1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../fakeroot_1.23-1_armhf.deb ... Unpacking fakeroot (1.23-1) ... Processing triggers for libc-bin (2.27-4) ... Setting up libfakeroot:armhf (1.23-1) ... Processing triggers for man-db (2.8.3-2) ... Setting up fakeroot (1.23-1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Processing triggers for libc-bin (2.27-4) ... I: Copying back the cached apt archive contents I: Building the package I: Running cd /build/mac-fdisk-0.1/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin" HOME="/nonexistent" dpkg-buildpackage -us -uc -rfakeroot dpkg-buildpackage: info: source package mac-fdisk dpkg-buildpackage: info: source version 0.1-18 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by John Paul Adrian Glaubitz dpkg-source --before-build mac-fdisk-0.1 dpkg-buildpackage: info: host architecture armhf fakeroot debian/rules clean test -f debian/rules rm -f build make clean make[1]: Entering directory '/build/mac-fdisk-0.1' rm -f *.o pdisk fdisk mac-fdisk pmac-fdisk make[1]: Leaving directory '/build/mac-fdisk-0.1' rm -f `find . -name "*~"` rm -rf debian/tmp debian/mac-fdisk-cross debian/pmac-fdisk debian/pmac-fdisk-cross debian/files* core debian/*substvars dpkg-source -b mac-fdisk-0.1 dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1) dpkg-source: info: using source format '1.0' dpkg-source: info: building mac-fdisk using existing mac-fdisk_0.1.orig.tar.gz dpkg-source: info: building mac-fdisk in mac-fdisk_0.1-18.diff.gz dpkg-source: warning: the diff modifies the following upstream files: Makefile dpme.h dump.c fdisk.c fdisklabel.c fdisklabel.h io.c kernel-defs.h mac-fdisk.8.in partition_map.c partition_map.h pdisk.c pmac-fdisk.8.in dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1) dpkg-source: info: building mac-fdisk in mac-fdisk_0.1-18.dsc debian/rules build test -f debian/rules make CFLAGS="-O2 -g -Wall" make[1]: Entering directory '/build/mac-fdisk-0.1' cc -O2 -g -Wall -c -o pdisk.o pdisk.c In file included from pdisk.c:43:0: kernel-defs.h:18:0: warning: "_IOC_SIZEBITS" redefined #define _IOC_SIZEBITS 13 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from pdisk.c:42: /usr/include/asm-generic/ioctl.h:32:0: note: this is the location of the previous definition # define _IOC_SIZEBITS 14 In file included from pdisk.c:43:0: kernel-defs.h:19:0: warning: "_IOC_DIRBITS" redefined #define _IOC_DIRBITS 3 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from pdisk.c:42: /usr/include/asm-generic/ioctl.h:36:0: note: this is the location of the previous definition # define _IOC_DIRBITS 2 pdisk.c: In function 'main': pdisk.c:156:5: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] exit(err); ^~~~ pdisk.c:156:5: warning: incompatible implicit declaration of built-in function 'exit' pdisk.c:156:5: note: include '' or provide a declaration of 'exit' pdisk.c: In function 'do_create_partition': pdisk.c:469:6: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration] if (strncmp(type_name, kFreeType, DPISTRLEN) == 0) { ^~~~~~~ pdisk.c:439:10: warning: unused variable 'mult' [-Wunused-variable] long mult; ^~~~ pdisk.c: In function 'do_reorder': pdisk.c:601:21: warning: unused variable 'cur' [-Wunused-variable] partition_map * cur; ^~~ cc -O2 -g -Wall -c -o dump.o dump.c dump.c:65:17: warning: missing braces around initializer [-Wmissing-braces] NAMES plist[] = { ^ "Drvr", "Apple_Driver", { } "Dr43", "Apple_Driver43", { } "Free", "Apple_Free", { } " HFS", "Apple_HFS", { } " MFS", "Apple_MFS", { } "PDOS", "Apple_PRODOS", { } "junk", "Apple_Scratch", { } "unix", "Apple_UNIX_SVR2", { } " map", "Apple_partition_map", { } 0, 0 { }; } dump.c: In function 'dump_partition_entry': dump.c:229:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=] printf("%s%-4d %.4s %-18.32s ", dev, entry->disk_address, s, p->dpme_name); ~~~^ ~~~~~~~~~~~~~~~~~~~ %-4ld dump.c:232:15: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=] printf("%s%-4d %20.32s %-18.32s ", dev, ~~~^ %-4ld entry->disk_address, p->dpme_type, p->dpme_name); ~~~~~~~~~~~~~~~~~~~ dump.c:204:10: warning: unused variable 'bp' [-Wunused-variable] BZB *bp; ^~ dump.c:201:27: warning: variable 'map' set but not used [-Wunused-but-set-variable] partition_map_header *map; ^~~ dump.c: In function 'list_all_disks': dump.c:319:21: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] data = (DPME *) malloc(PBLOCK_SIZE); ^~~~~~ dump.c:319:21: warning: incompatible implicit declaration of built-in function 'malloc' dump.c:319:21: note: include '' or provide a declaration of 'malloc' dump.c:362:5: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration] free(data); ^~~~ dump.c:362:5: warning: incompatible implicit declaration of built-in function 'free' dump.c:362:5: note: include '' or provide a declaration of 'free' dump.c:317:10: warning: unused variable 't' [-Wunused-variable] long t; ^ dump.c: In function 'show_data_structures': dump.c:384:46: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=] printf("map %d blocks out of %d, media %u blocks\n", ~^ %lu map->blocks_in_map, map->maximum_in_map, map->media_size); ~~~~~~~~~~~~~~~ dump.c:428:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%2d: %20.32s ", ~~^ %2ld entry->disk_address, p->dpme_type); ~~~~~~~~~~~~~~~~~~~ dump.c:452:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%2d: ", entry->disk_address); ~~^ ~~~~~~~~~~~~~~~~~~~ %2ld dump.c:469:12: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=] printf("%2d: ", entry->disk_address); ~~^ ~~~~~~~~~~~~~~~~~~~ %2ld dump.c:497:15: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=] printf(" %2d", bzb_slice_get(bp)-1); ~~^ %2ld cc -O2 -g -Wall -c -o partition_map.o partition_map.c In file included from partition_map.c:38:0: kernel-defs.h:18:0: warning: "_IOC_SIZEBITS" redefined #define _IOC_SIZEBITS 13 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from partition_map.c:37: /usr/include/asm-generic/ioctl.h:32:0: note: this is the location of the previous definition # define _IOC_SIZEBITS 14 In file included from partition_map.c:38:0: kernel-defs.h:19:0: warning: "_IOC_DIRBITS" redefined #define _IOC_DIRBITS 3 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from partition_map.c:37: /usr/include/asm-generic/ioctl.h:36:0: note: this is the location of the previous definition # define _IOC_DIRBITS 2 partition_map.c: In function 'open_partition_map': partition_map.c:129:36: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] map = (partition_map_header *) malloc(sizeof(partition_map_header)); ^~~~~~ partition_map.c:129:36: warning: incompatible implicit declaration of built-in function 'malloc' partition_map.c:129:36: note: include '' or provide a declaration of 'malloc' partition_map.c:109:19: warning: unused variable 'length' [-Wunused-variable] unsigned long length; ^~~~~~ partition_map.c: In function 'close_partition_map': partition_map.c:184:5: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration] free(map->misc); ^~~~ partition_map.c:184:5: warning: incompatible implicit declaration of built-in function 'free' partition_map.c:184:5: note: include '' or provide a declaration of 'free' partition_map.c: In function 'read_partition_map': partition_map.c:203:21: warning: incompatible implicit declaration of built-in function 'malloc' data = (DPME *) malloc(PBLOCK_SIZE); ^~~~~~ partition_map.c:203:21: note: include '' or provide a declaration of 'malloc' partition_map.c:210:2: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:210:2: note: include '' or provide a declaration of 'free' partition_map.c:214:2: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:214:2: note: include '' or provide a declaration of 'free' partition_map.c:221:3: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:221:3: note: include '' or provide a declaration of 'free' partition_map.c:238:3: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:238:3: note: include '' or provide a declaration of 'free' partition_map.c:243:3: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:243:3: note: include '' or provide a declaration of 'free' partition_map.c: In function 'write_partition_map': partition_map.c:267:19: warning: implicit declaration of function 'calloc' [-Wimplicit-function-declaration] block = (char *) calloc(1, PBLOCK_SIZE); ^~~~~~ partition_map.c:267:19: warning: incompatible implicit declaration of built-in function 'calloc' partition_map.c:267:19: note: include '' or provide a declaration of 'calloc' partition_map.c:270:6: warning: incompatible implicit declaration of built-in function 'free' free(block); ^~~~ partition_map.c:270:6: note: include '' or provide a declaration of 'free' partition_map.c:282:19: warning: incompatible implicit declaration of built-in function 'malloc' block = (char *) malloc(PBLOCK_SIZE); ^~~~~~ partition_map.c:282:19: note: include '' or provide a declaration of 'malloc' partition_map.c:288:6: warning: incompatible implicit declaration of built-in function 'free' free(block); ^~~~ partition_map.c:288:6: note: include '' or provide a declaration of 'free' partition_map.c:300:6: warning: implicit declaration of function 'sync' [-Wimplicit-function-declaration] sync(); ^~~~ partition_map.c:302:2: warning: implicit declaration of function 'sleep' [-Wimplicit-function-declaration] sleep(2); ^~~~~ partition_map.c: In function 'add_data_to_map': partition_map.c:350:31: warning: incompatible implicit declaration of built-in function 'malloc' entry = (partition_map *) malloc(sizeof(partition_map)); ^~~~~~ partition_map.c:350:31: note: include '' or provide a declaration of 'malloc' partition_map.c:368:6: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration] if (strncmp(data->dpme_type, kMapType, DPISTRLEN) == 0) { ^~~~~~~ partition_map.c: In function 'create_partition_map': partition_map.c:421:36: warning: incompatible implicit declaration of built-in function 'malloc' map = (partition_map_header *) malloc(sizeof(partition_map_header)); ^~~~~~ partition_map.c:421:36: note: include '' or provide a declaration of 'malloc' partition_map.c:437:34: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] printf("size of 'device' is %u blocks: ", number); ~^ %lu partition_map.c:443:38: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] printf("new size of 'device' is %u blocks\n", number); ~^ %lu partition_map.c:462:18: warning: incompatible implicit declaration of built-in function 'calloc' data = (DPME *) calloc(1, PBLOCK_SIZE); ^~~~~~ partition_map.c:462:18: note: include '' or provide a declaration of 'calloc' partition_map.c:471:6: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration] strncpy(data->dpme_name, kFreeName, DPISTRLEN); ^~~~~~~ partition_map.c:471:6: warning: incompatible implicit declaration of built-in function 'strncpy' partition_map.c:471:6: note: include '' or provide a declaration of 'strncpy' In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:138:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_writable_set(p, v) bitfield_set(&p->dpme_flags, 5, 1, v) ^ partition_map.c:475:6: note: in expansion of macro 'dpme_writable_set' dpme_writable_set(data, 1); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:139:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_readable_set(p, v) bitfield_set(&p->dpme_flags, 4, 1, v) ^ partition_map.c:476:6: note: in expansion of macro 'dpme_readable_set' dpme_readable_set(data, 1); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:140:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_bootable_set(p, v) bitfield_set(&p->dpme_flags, 3, 1, v) ^ partition_map.c:477:6: note: in expansion of macro 'dpme_bootable_set' dpme_bootable_set(data, 0); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:141:45: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_in_use_set(p, v) bitfield_set(&p->dpme_flags, 2, 1, v) ^ partition_map.c:478:6: note: in expansion of macro 'dpme_in_use_set' dpme_in_use_set(data, 0); ^~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:142:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_allocated_set(p, v) bitfield_set(&p->dpme_flags, 1, 1, v) ^ partition_map.c:479:6: note: in expansion of macro 'dpme_allocated_set' dpme_allocated_set(data, 0); ^~~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:143:44: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_valid_set(p, v) bitfield_set(&p->dpme_flags, 0, 1, v) ^ partition_map.c:480:6: note: in expansion of macro 'dpme_valid_set' dpme_valid_set(data, 1); ^~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ partition_map.c:483:3: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:483:3: note: include '' or provide a declaration of 'free' partition_map.c:408:9: warning: unused variable 'ok' [-Wunused-variable] int ok; ^~ partition_map.c:406:19: warning: unused variable 'length' [-Wunused-variable] unsigned long length; ^~~~~~ partition_map.c: In function 'add_partition_to_map': partition_map.c:589:2: warning: incompatible implicit declaration of built-in function 'free' free(cur->data); ^~~~ partition_map.c:589:2: note: include '' or provide a declaration of 'free' partition_map.c:598:6: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:598:6: note: include '' or provide a declaration of 'free' partition_map.c:604:7: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:604:7: note: include '' or provide a declaration of 'free' partition_map.c: In function 'create_data': partition_map.c:622:21: warning: incompatible implicit declaration of built-in function 'calloc' data = (DPME *) calloc(1, PBLOCK_SIZE); ^~~~~~ partition_map.c:622:21: note: include '' or provide a declaration of 'calloc' partition_map.c:631:2: warning: incompatible implicit declaration of built-in function 'strncpy' strncpy(data->dpme_name, name, DPISTRLEN); ^~~~~~~ partition_map.c:631:2: note: include '' or provide a declaration of 'strncpy' In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:138:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_writable_set(p, v) bitfield_set(&p->dpme_flags, 5, 1, v) ^ partition_map.c:635:2: note: in expansion of macro 'dpme_writable_set' dpme_writable_set(data, 1); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:139:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_readable_set(p, v) bitfield_set(&p->dpme_flags, 4, 1, v) ^ partition_map.c:636:2: note: in expansion of macro 'dpme_readable_set' dpme_readable_set(data, 1); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:140:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_bootable_set(p, v) bitfield_set(&p->dpme_flags, 3, 1, v) ^ partition_map.c:637:2: note: in expansion of macro 'dpme_bootable_set' dpme_bootable_set(data, 0); ^~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:141:45: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_in_use_set(p, v) bitfield_set(&p->dpme_flags, 2, 1, v) ^ partition_map.c:638:2: note: in expansion of macro 'dpme_in_use_set' dpme_in_use_set(data, 0); ^~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:142:47: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_allocated_set(p, v) bitfield_set(&p->dpme_flags, 1, 1, v) ^ partition_map.c:639:2: note: in expansion of macro 'dpme_allocated_set' dpme_allocated_set(data, 1); ^~~~~~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ In file included from partition_map.h:28:0, from partition_map.c:42: dpme.h:143:44: warning: passing argument 1 of 'bitfield_set' from incompatible pointer type [-Wincompatible-pointer-types] #define dpme_valid_set(p, v) bitfield_set(&p->dpme_flags, 0, 1, v) ^ partition_map.c:640:2: note: in expansion of macro 'dpme_valid_set' dpme_valid_set(data, 1); ^~~~~~~~~~~~~~ In file included from dpme.h:41:0, from partition_map.h:28, from partition_map.c:42: bitfield.h:66:15: note: expected 'long unsigned int *' but argument is of type 'u32 * {aka unsigned int *}' unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value); ^~~~~~~~~~~~ partition_map.c: In function 'compute_device_size': partition_map.c:712:21: warning: incompatible implicit declaration of built-in function 'malloc' data = (char *) malloc(PBLOCK_SIZE); ^~~~~~ partition_map.c:712:21: note: include '' or provide a declaration of 'malloc' partition_map.c:748:2: warning: incompatible implicit declaration of built-in function 'free' free(data); ^~~~ partition_map.c:748:2: note: include '' or provide a declaration of 'free' partition_map.c: In function 'delete_partition_from_map': partition_map.c:774:5: warning: incompatible implicit declaration of built-in function 'free' free(entry->data); ^~~~ partition_map.c:774:5: note: include '' or provide a declaration of 'free' partition_map.c: In function 'delete_entry': partition_map.c:875:5: warning: incompatible implicit declaration of built-in function 'free' free(entry->data); ^~~~ partition_map.c:875:5: note: include '' or provide a declaration of 'free' partition_map.c: In function 'write_partition_map': partition_map.c:328:6: warning: 'saved_errno' may be used uninitialized in this function [-Wmaybe-uninitialized] error(saved_errno, "Re-read of partition map failed"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ partition_map.c:258:9: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized] int i; ^ partition_map.c: In function 'compute_device_size': partition_map.c:744:5: warning: 'valid' may be used uninitialized in this function [-Wmaybe-uninitialized] if (valid != 0) { ^ partition_map.c:673:25: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized] unsigned long l, r, x; ^ partition_map.c: In function 'add_partition_to_map': partition_map.c:600:11: warning: 'new_length' may be used uninitialized in this function [-Wmaybe-uninitialized] data = create_data(kFreeName, kFreeType, new_base, new_length); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ partition_map.c:600:11: warning: 'new_base' may be used uninitialized in this function [-Wmaybe-uninitialized] cc -O2 -g -Wall -c -o convert.o convert.c cc -O2 -g -Wall -c -o io.o io.c io.c: In function 'get_string': io.c:329:26: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] ret_value = (char *) malloc(STRING_CHUNK); ^~~~~~ io.c:329:26: warning: incompatible implicit declaration of built-in function 'malloc' io.c:329:26: note: include '' or provide a declaration of 'malloc' io.c:348:6: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration] free(ret_value); ^~~~ io.c:348:6: warning: incompatible implicit declaration of built-in function 'free' io.c:348:6: note: include '' or provide a declaration of 'free' io.c: In function 'read_block': io.c:445:11: warning: implicit declaration of function 'lseek64'; did you mean 'lseek'? [-Wimplicit-function-declaration] if ((x = lseek64(fd, x, 0)) < 0) { ^~~~~~~ lseek io.c: In function 'write_block': io.c:469:29: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=] printf("Can't write block %u to file", num); ~^ %lu io.c: In function 'open_device': io.c:533:9: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] return open(path, oflag); ^~~~ popen cc -O2 -g -Wall -c -o errors.o errors.c errors.c: In function 'fatal': errors.c:127:5: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] exit(value); ^~~~ errors.c:127:5: warning: incompatible implicit declaration of built-in function 'exit' errors.c:127:5: note: include '' or provide a declaration of 'exit' cc -O2 -g -Wall -c -o bitfield.o bitfield.c bitfield.c: In function 'bitfield_set': bitfield.c:76:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ bitfield.c: In function 'bitfield_get': bitfield.c:94:9: warning: unused variable 'i' [-Wunused-variable] int i; ^ cc pdisk.o dump.o partition_map.o convert.o io.o errors.o bitfield.o -o pdisk /usr/bin/ld: errors.o: in function `fatal': /build/mac-fdisk-0.1/errors.c:119: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead /usr/bin/ld: /build/mac-fdisk-0.1/errors.c:119: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead cc -O2 -g -Wall -c -o fdisk.o fdisk.c In file included from fdisk.c:75:0: kernel-defs.h:18:0: warning: "_IOC_SIZEBITS" redefined #define _IOC_SIZEBITS 13 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from fdisk.c:71: /usr/include/asm-generic/ioctl.h:32:0: note: this is the location of the previous definition # define _IOC_SIZEBITS 14 In file included from fdisk.c:75:0: kernel-defs.h:19:0: warning: "_IOC_DIRBITS" redefined #define _IOC_DIRBITS 3 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from fdisk.c:71: /usr/include/asm-generic/ioctl.h:36:0: note: this is the location of the previous definition # define _IOC_DIRBITS 2 fdisk.c: In function 'read_extended': fdisk.c:430:7: warning: implicit declaration of function 'lseek64'; did you mean 'lseek'? [-Wimplicit-function-declaration] if (lseek64(fd, (loff_t)offsets[partitions] ^~~~~~~ lseek fdisk.c: In function 'delete_partition': fdisk.c:745:20: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if(part_table[5]) /* prevent SEGFAULT */ ^~ fdisk.c:751:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' offsets[5] = extended_offset; ^~~~~~~ fdisk.c: In function 'list_table': fdisk.c:906:13: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] int i, w = strlen(disk_device); ^~~~~~ fdisk.c:906:13: warning: incompatible implicit declaration of built-in function 'strlen' fdisk.c:906:13: note: include '' or provide a declaration of 'strlen' fdisk.c: In function 'write_table': fdisk.c:1291:11: warning: implicit declaration of function 'strerror'; did you mean 'perror'? [-Wimplicit-function-declaration] error, strerror(error)); ^~~~~~~~ perror fdisk.c:1289:48: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat=] printf("Re-read table failed with error %d: %s.\nReboot your " ~^ %d fdisk.c:1291:11: error, strerror(error)); ~~~~~~~~~~~~~~~ fdisk.c: At top level: fdisk.c:1418:6: warning: return type of 'main' is not 'int' [-Wmain] void main(int argc, char **argv) ^~~~ fdisk.c: In function 'main': fdisk.c:1450:5: warning: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration] strncpy(disk_device, argv[2], 8); ^~~~~~~ fdisk.c:1450:5: warning: incompatible implicit declaration of built-in function 'strncpy' fdisk.c:1450:5: note: include '' or provide a declaration of 'strncpy' cc -O2 -g -Wall -c -o fdisklabel.o fdisklabel.c In file included from fdisklabel.c:49:0: kernel-defs.h:18:0: warning: "_IOC_SIZEBITS" redefined #define _IOC_SIZEBITS 13 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from fdisklabel.c:46: /usr/include/asm-generic/ioctl.h:32:0: note: this is the location of the previous definition # define _IOC_SIZEBITS 14 In file included from fdisklabel.c:49:0: kernel-defs.h:19:0: warning: "_IOC_DIRBITS" redefined #define _IOC_DIRBITS 3 In file included from /usr/include/arm-linux-gnueabihf/asm/ioctl.h:1:0, from /usr/include/linux/ioctl.h:5, from /usr/include/asm-generic/ioctls.h:5, from /usr/include/arm-linux-gnueabihf/asm/ioctls.h:7, from /usr/include/arm-linux-gnueabihf/bits/ioctls.h:23, from /usr/include/arm-linux-gnueabihf/sys/ioctl.h:26, from fdisklabel.c:46: /usr/include/asm-generic/ioctl.h:36:0: note: this is the location of the previous definition # define _IOC_DIRBITS 2 In file included from fdisklabel.c:53:0: fdisklabel.h:62:2: error: #error unknown architecture #error unknown architecture ^~~~~ fdisklabel.c:80:20: error: 'BSD_BBSIZE' undeclared here (not in a function); did you mean 'DEV_BSIZE'? static char buffer[BSD_BBSIZE]; ^~~~~~~~~~ DEV_BSIZE fdisklabel.c: In function 'bsd_print_disklabel': fdisklabel.c:275:32: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "bytes/sector: %d\n", lp->d_secsize); ~^ ~~~~~~~~~~~~~ %ld fdisklabel.c:276:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "sectors/track: %d\n", lp->d_nsectors); ~^ ~~~~~~~~~~~~~~ %ld fdisklabel.c:277:35: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "tracks/cylinder: %d\n", lp->d_ntracks); ~^ ~~~~~~~~~~~~~ %ld fdisklabel.c:278:36: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "sectors/cylinder: %d\n", lp->d_secpercyl); ~^ ~~~~~~~~~~~~~~~ %ld fdisklabel.c:279:29: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "cylinders: %d\n", lp->d_ncylinders); ~^ ~~~~~~~~~~~~~~~~ %ld fdisklabel.c:284:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "headswitch: %d\t\t# milliseconds\n", lp->d_headswitch); ~^ ~~~~~~~~~~~~~~~~ %ld fdisklabel.c:285:39: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "track-to-track seek: %d\t# milliseconds\n", lp->d_trkseek); ~^ ~~~~~~~~~~~~~ %ld fdisklabel.c:293:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, "%d ", lp->d_drivedata[j]); ~^ ~~~~~~~~~~~~~~~~~~ %ld fdisklabel.c:300:27: warning: format '%d' expects argument of type 'int', but argument 4 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, " %c: %8d %8d ", 'a' + i, ~~^ %8ld pp->p_size, pp->p_offset); ~~~~~~~~~~ fdisklabel.c:300:31: warning: format '%d' expects argument of type 'int', but argument 5 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, " %c: %8d %8d ", 'a' + i, ~~^ %8ld pp->p_size, pp->p_offset); ~~~~~~~~~~~~ fdisklabel.c:309:22: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, " %5d %5d %5.5s ", ~~^ %5ld pp->p_fsize, pp->p_fsize * pp->p_frag, ""); ~~~~~~~~~~~ fdisklabel.c:309:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] fprintf(f, " %5d %5d %5.5s ", ~~^ %5ld pp->p_fsize, pp->p_fsize * pp->p_frag, ""); ~~~~~~~~~~~~~~~~~~~~~~~~ fdisklabel.c:314:22: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long {aka long unsigned int}' [-Wformat=] fprintf(f, " %5d %5d %5d ", ~~^ %5ld pp->p_fsize, pp->p_fsize * pp->p_frag, ~~~~~~~~~~~ fdisklabel.c:314:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=] fprintf(f, " %5d %5d %5d ", ~~^ %5ld pp->p_fsize, pp->p_fsize * pp->p_frag, ~~~~~~~~~~~~~~~~~~~~~~~~ fdisklabel.c:323:31: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] fprintf(f, "\t# (Cyl. %4d", ~~^ %4ld fdisklabel.c:327:8: pp->p_offset / lp->d_secpercyl + 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fdisklabel.c:333:22: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] fprintf(f, "- %d", ~^ %ld (pp->p_offset + ~~~~~~~~~~~~~~~ pp->p_size + lp->d_secpercyl - 1) / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #if 0 ~~~~~ lp->d_secpercyl - 1); /* differs from Linux fdisk */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #else ~~~~~ lp->d_secpercyl); ~~~~~~~~~~~~~~~ fdisklabel.c: In function 'bsd_create_disklabel': fdisklabel.c:384:7: error: expected '}' before 'else' else ^~~~ fdisklabel.c: At top level: fdisklabel.c:387:5: error: expected identifier or '(' before 'else' else if (c == 'n') ^~~~ fdisklabel.c:389:1: error: expected identifier or '(' before '}' token } ^ fdisklabel.c: In function 'bsd_write_bootstrap': fdisklabel.c:477:14: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] line_ptr[strlen (line_ptr)-1] = '\0'; ^~~~~~ fdisklabel.c:477:14: warning: incompatible implicit declaration of built-in function 'strlen' fdisklabel.c:477:14: note: include '' or provide a declaration of 'strlen' fdisklabel.c:485:15: error: 'BSD_LABELSECTOR' undeclared (first use in this function); did you mean 'BSD_D_BADSECT'? d = &buffer[BSD_LABELSECTOR * SECTOR_SIZE]; ^~~~~~~~~~~~~~~ BSD_D_BADSECT fdisklabel.c:485:15: note: each undeclared identifier is reported only once for each function it appears in fdisklabel.c:486:3: warning: implicit declaration of function 'bcopy' [-Wimplicit-function-declaration] bcopy (d, &dl, sizeof (struct disklabel)); ^~~~~ fdisklabel.c:486:3: warning: incompatible implicit declaration of built-in function 'bcopy' fdisklabel.c:489:3: warning: implicit declaration of function 'bzero' [-Wimplicit-function-declaration] bzero (d, sizeof (struct disklabel)); ^~~~~ fdisklabel.c:489:3: warning: incompatible implicit declaration of built-in function 'bzero' fdisklabel.c:515:7: warning: implicit declaration of function 'lseek64'; did you mean 'lseek'? [-Wimplicit-function-declaration] if (lseek64 (fd, sector * SECTOR_SIZE, SEEK_SET) == -1) ^~~~~~~ lseek fdisklabel.c: In function 'bsd_initlabel': fdisklabel.c:611:3: warning: incompatible implicit declaration of built-in function 'bzero' bzero (d, sizeof (struct disklabel)); ^~~~~ fdisklabel.c:615:7: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration] if (strncmp (disk_device, "/dev/sd", 7) == 0) ^~~~~~~ fdisklabel.c:645:19: error: 'BSD_SBSIZE' undeclared (first use in this function); did you mean 'BSD_BBSIZE'? d -> d_sbsize = BSD_SBSIZE; ^~~~~~~~~~ BSD_BBSIZE fdisklabel.c:604:25: warning: unused variable 'pp' [-Wunused-variable] struct bsd_partition *pp; ^~ fdisklabel.c: In function 'bsd_readlabel': fdisklabel.c:684:3: warning: incompatible implicit declaration of built-in function 'bcopy' bcopy (&buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~ fdisklabel.c:684:18: error: 'BSD_LABELSECTOR' undeclared (first use in this function); did you mean 'BSD_D_BADSECT'? bcopy (&buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~~~~~~~~~~~ BSD_D_BADSECT fdisklabel.c:684:50: error: 'BSD_LABELOFFSET' undeclared (first use in this function); did you mean 'BSD_LABELSECTOR'? bcopy (&buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~~~~~~~~~~~ BSD_LABELSECTOR fdisklabel.c: In function 'bsd_writelabel': fdisklabel.c:719:3: warning: incompatible implicit declaration of built-in function 'bcopy' bcopy (d, &buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~ fdisklabel.c:719:21: error: 'BSD_LABELSECTOR' undeclared (first use in this function); did you mean 'BSD_D_BADSECT'? bcopy (d, &buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~~~~~~~~~~~ BSD_D_BADSECT fdisklabel.c:719:53: error: 'BSD_LABELOFFSET' undeclared (first use in this function); did you mean 'BSD_LABELSECTOR'? bcopy (d, &buffer[BSD_LABELSECTOR * SECTOR_SIZE + BSD_LABELOFFSET], ^~~~~~~~~~~~~~~ BSD_LABELSECTOR At top level: fdisklabel.c:703:1: warning: 'bsd_writelabel' defined but not used [-Wunused-function] bsd_writelabel (struct partition *p, struct disklabel *d) ^~~~~~~~~~~~~~ fdisklabel.c:669:1: warning: 'bsd_readlabel' defined but not used [-Wunused-function] bsd_readlabel (struct partition *p, struct disklabel *d) ^~~~~~~~~~~~~ fdisklabel.c:601:1: warning: 'bsd_initlabel' defined but not used [-Wunused-function] bsd_initlabel (struct partition *p, struct disklabel *d, int pindex) ^~~~~~~~~~~~~ fdisklabel.c:361:1: warning: 'bsd_create_disklabel' defined but not used [-Wunused-function] bsd_create_disklabel (void) ^~~~~~~~~~~~~~~~~~~~ fdisklabel.c:80:13: warning: 'buffer' defined but not used [-Wunused-variable] static char buffer[BSD_BBSIZE]; ^~~~~~ : recipe for target 'fdisklabel.o' failed make[1]: *** [fdisklabel.o] Error 1 make[1]: Leaving directory '/build/mac-fdisk-0.1' debian/rules:32: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 I: Terminate timeout process I: copying local configuration /usr/lib/pbuilder/pbuilder-modules: line 1: 24231 Terminated ( : Timeout process; sleep "${TIMEOUT_TIME}"; log.i "Terminating build process due to timeout "; kill "${BUILD_PID}" || true ) E: Failed autobuilding of package I: user script /var/cache/pbuilder/build/27335/tmp/hooks/C01kill-gpg-agent starting I: user script /var/cache/pbuilder/build/27335/tmp/hooks/C01kill-gpg-agent finished I: unmounting /sys filesystem I: unmounting /proc filesystem I: unmounting /dev filesystem I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env  I: removing directory /var/cache/pbuilder/build/27335 and its subdirectories FAILED to build: 1