From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Tue, 19 Apr 2016 08:34:34 +0200 (CEST) Received: by mail-wm0-x244.google.com with SMTP id y144so2164245wmd.0 for ; Mon, 18 Apr 2016 23:34:34 -0700 (PDT) References: <1461046565-16999-1-git-send-email-vapier@gentoo.org> From: Milan Broz Message-ID: <5715D177.5000701@gmail.com> Date: Tue, 19 Apr 2016 08:34:31 +0200 MIME-Version: 1.0 In-Reply-To: <1461046565-16999-1-git-send-email-vapier@gentoo.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] [PATCH] include sys/sysmacros.h for major/minor/makedev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Frysinger Cc: dm-crypt@saout.de On 04/19/2016 08:16 AM, Mike Frysinger wrote: > These functions are defined in that header, so include it when needed. > Otherwise we can get build failures like: > veritysetup-utils_loop.o: In function '_sysfs_backing_file': > utils_loop.c:(.text+0x50): undefined reference to 'minor' > utils_loop.c:(.text+0x5e): undefined reference to 'major' > veritysetup-utils_loop.o: In function 'crypt_loop_device': > utils_loop.c:(.text+0x638): undefined reference to 'major' > ../lib/.libs/libcryptsetup.so: undefined reference to 'makedev' > --- > lib/utils_devpath.c | 1 + > lib/utils_loop.c | 1 + > lib/utils_wipe.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/lib/utils_devpath.c b/lib/utils_devpath.c > index 963785a..0bc0563 100644 > --- a/lib/utils_devpath.c > +++ b/lib/utils_devpath.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include Shouldn't we also check for existence of this header in autoconf? I do not think it is present on all systems (FreeBSD?). (Basically the same like util-linux is doing now.) Milan > #include > #include "internal.h" > > diff --git a/lib/utils_loop.c b/lib/utils_loop.c > index ff30a27..b392160 100644 > --- a/lib/utils_loop.c > +++ b/lib/utils_loop.c > @@ -27,6 +27,7 @@ > #include > #include > #include > +#include > #include > #include > > diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c > index 210c566..8e2a2aa 100644 > --- a/lib/utils_wipe.c > +++ b/lib/utils_wipe.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > #include > > #include "libcryptsetup.h" >