mountpoint.c:264:33: error: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration]
Hello,
I am trying to build dovecot-2.4.2 on Solaris 11.4 with gcc 14.2 and getting the following error:
CC module-dir.lo CC mountpoint.lo mountpoint.c: In function ‘mountpoint_iter_next’: mountpoint.c:264:33: error: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration] 264 | iter->mnt.dev = makedev(ent.ext.mnt_major, ent.ext.mnt_minor); | ^~~~~~~ *** Error code 1 The following command caused the error: echo " CC " mountpoint.lo;/bin/sh ../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -std=gnu11 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -MT mountpoint.lo -MD -MP -MF .deps/mountpoint.Tpo -c -o mountpoint.lo mountpoint.c make: Fatal error: Command failed for target `mountpoint.lo' Current working directory /var/tmp/dovecot-2.4.0/src/lib *** Error code 1
I have been using dovecot for a long time and haven't seen this before. I just checked and rebuilt dovecot-2.3.21 and had no problems.
Any ideas?
Thanks,
Andrew
Hello,
I am trying to build dovecot-2.4.2 on Solaris 11.4 with gcc 14.2 and getting the following error:
CC module-dir.lo
CC mountpoint.lo
mountpoint.c: In function mountpoint_iter_next': mountpoint.c:264:33: error: implicit declaration of function makedev'
[-Wimplicit-function-declaration]
264 | iter->mnt.dev = makedev(ent.ext.mnt_major,
ent.ext.mnt_minor);
| ^~~~~~~
*** Error code 1
The following command caused the error:
echo " CC " mountpoint.lo;/bin/sh ../../libtool --silent --tag=CC
--mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -std=gnu11 -g -O2
-fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-mfunction-return=keep -mindirect-branch=keep -Wall -W
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime
-Wstrict-aliasing=2 -MT mountpoint.lo -MD -MP -MF .deps/mountpoint.Tpo -c
-o mountpoint.lo mountpoint.c
make: Fatal error: Command failed for target `mountpoint.lo'
Current working directory /var/tmp/dovecot-2.4.0/src/lib
*** Error code 1
I have been using dovecot for a long time and haven't seen this before. I just checked and rebuilt dovecot-2.3.21 and had no problems.
Any ideas?
Thanks,
Andrew
On 13/01/2026 22:54 EET Andrew Watkins via dovecot <dovecot@dovecot.org> wrote:
Hello,
I am trying to build dovecot-2.4.2 on Solaris 11.4 with gcc 14.2 and getting the following error:
CC module-dir.lo CC mountpoint.lo mountpoint.c: In function ‘mountpoint_iter_next’: mountpoint.c:264:33: error: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration] 264 | iter->mnt.dev = makedev(ent.ext.mnt_major, ent.ext.mnt_minor); | ^~~~~~~ *** Error code 1 The following command caused the error: echo " CC " mountpoint.lo;/bin/sh ../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -std=gnu11 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -MT mountpoint.lo -MD -MP -MF .deps/mountpoint.Tpo -c -o mountpoint.lo mountpoint.c make: Fatal error: Command failed for target `mountpoint.lo' Current working directory /var/tmp/dovecot-2.4.0/src/lib *** Error code 1
I have been using dovecot for a long time and haven't seen this before. I just checked and rebuilt dovecot-2.3.21 and had no problems.
Any ideas?
Thanks,
Andrew Hello,
I am trying to build dovecot-2.4.2 on Solaris 11.4 with gcc 14.2 and getting the following error:
CC module-dir.lo CC mountpoint.lo mountpoint.c: In function `mountpoint_iter_next': mountpoint.c:264:33: error: implicit declaration of function `makedev' [-Wimplicit-function-declaration] 264 | iter->mnt.dev = makedev(ent.ext.mnt_major, ent.ext.mnt_minor); | ^~~~~~~ *** Error code 1 The following command caused the error: echo " CC " mountpoint.lo;/bin/sh ../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -std=gnu11 -g -O2 -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -mfunction-return=keep -mindirect-branch=keep -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -MT mountpoint.lo -MD -MP -MF .deps/mountpoint.Tpo -c -o mountpoint.lo mountpoint.c make: Fatal error: Command failed for target `mountpoint.lo' Current working directory /var/tmp/dovecot-2.4.0/src/lib *** Error code 1
I have been using dovecot for a long time and haven't seen this before. I just checked and rebuilt dovecot-2.3.21 and had no problems.
Any ideas?
Thanks,
Andrew
Can you see if diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN helps? Aki
On 1/16/2026 11:38 AM, Aki Tuomi wrote:
Can you see if
diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN
helps?
Aki
Thanks, that worked. There are 2 other files which use "makedev" which give the same error: src/imap-hibernate/imap-hibernate-client.c: state_r->peer_dev = makedev(peer_dev_major, peer_dev_minor); src/imap/imap-master-client.c: makedev(peer_dev_major, peer_dev_minor); So the "#include <sys/mkdev.h>" has to be added to them as well. Question, which Definition to use so only added with SOLARIS? I am test the installation now to see if it all works on Solaris 11.4 Thanks, Andrew On 1/16/2026 11:38 AM, Aki Tuomi wrote: Can you see if diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN helps? Aki Thanks, that worked. There are 2 other files which use "makedev" which give the same error: src/imap-hibernate/imap-hibernate-client.c: state_r->peer_dev = makedev(peer_dev_major, peer_dev_minor); src/imap/imap-master-client.c: makedev(peer_dev_major, peer_dev_minor); So the "#include <sys/mkdev.h>" has to be added to them as well. Question, which Definition to use so only added with SOLARIS? I am test the installation now to see if it all works on Solaris 11.4 Thanks, Andrew
Maybe this is enough? Aki diff --git a/src/imap-hibernate/imap-hibernate-client.c b/src/imap-hibernate/imap-hibernate-client.c index b1c02db188..5fb588f3c3 100644 --- a/src/imap-hibernate/imap-hibernate-client.c +++ b/src/imap-hibernate/imap-hibernate-client.c @@ -12,6 +12,10 @@ #include "imap-client.h" #include "imap-hibernate-client.h" +#if defined(HAVE_SYS_MNTTAB_H) +# include <sys/mkdev.h> /* Solaris */ +#endif + struct imap_hibernate_client { struct connection conn; struct imap_client *imap_client; diff --git a/src/imap/imap-master-client.c b/src/imap/imap-master-client.c index 9ae429e5cd..d90f8f2306 100644 --- a/src/imap/imap-master-client.c +++ b/src/imap/imap-master-client.c @@ -18,6 +18,10 @@ #include "imap-state.h" #include "imap-master-client.h" +#if defined(HAVE_SYS_MNTTAB_H) +# include <sys/mkdev.h> /* Solaris */ +#endif + struct imap_master_client { struct connection conn; bool imap_client_created; diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN
On 19/01/2026 12:17 EET Andrew Watkins via dovecot <dovecot@dovecot.org> wrote:
On 1/16/2026 11:38 AM, Aki Tuomi wrote:
Can you see if
diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN
helps?
Aki
Thanks, that worked.
There are 2 other files which use "makedev" which give the same error:
src/imap-hibernate/imap-hibernate-client.c: state_r->peer_dev = makedev(peer_dev_major, peer_dev_minor);
src/imap/imap-master-client.c: makedev(peer_dev_major, peer_dev_minor);
So the "#include <sys/mkdev.h>" has to be added to them as well. Question, which Definition to use so only added with SOLARIS?
I am test the installation now to see if it all works on Solaris 11.4
Thanks,
Andrew On 1/16/2026 11:38 AM, Aki Tuomi wrote:
Can you see if
diff --git a/src/lib/mountpoint.c b/src/lib/mountpoint.c index 3d2150ec6e..816d0d6f54 100644 --- a/src/lib/mountpoint.c +++ b/src/lib/mountpoint.c @@ -27,6 +27,7 @@ # include <stdio.h> # include <sys/mnttab.h> /* Solaris */ # include <sys/mntent.h> +# include <sys/mkdev.h> # define MOUNTPOINT_SOLARIS #else # define MOUNTPOINT_UNKNOWN
helps?
Aki
Thanks, that worked.
There are 2 other files which use "makedev" which give the same error:
src/imap-hibernate/imap-hibernate-client.c: state_r->peer_dev = makedev(peer_dev_major, peer_dev_minor);
src/imap/imap-master-client.c: makedev(peer_dev_major, peer_dev_minor);
So the "#include <sys/mkdev.h>" has to be added to them as well. Question, which Definition to use so only added with SOLARIS?
I am test the installation now to see if it all works on Solaris 11.4
Thanks,
Andrew _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
participants (2)
-
Aki Tuomi
-
Andrew Watkins