palo/paloio.c:64: warning: implicit declaration of function 'memcmp'
PATCH 1/1 palo/paloio.c:64: warning: implicit declaration of function 'memcmp'
I have been carrying this patch in the Gentoo repository[1] for quite a while now.
Add missing include for memcmp.
b/palo/paloio.c renamed from a/palo/paloio.c +1 -0
@@ -7,6 +7,7 @@*/ #include <unistd.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h>
PATCH 1/1 palo/palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In file included from /usr/include/fcntl.h:296:0,
from palo.c:16:
In function 'open',
inlined from 'do_formatted' at palo.c:482:5:/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
palo/palo.c +1 -1
@@ -484,7 +484,7 @@ do_formatted(int init, int media, const char *medianame, int partition,error (14 ,"bootloader" );sprintf (badblockfilename,"/tmp/paloblk-%d" ,getpid ()); -if ((fd =open (badblockfilename,O_RDWR |O_CREAT |O_TRUNC )) <0 ) { +if ((fd =open (badblockfilename,O_RDWR |O_CREAT |O_TRUNC ,S_IRUSR |S_IWUSR )) <0 ) {perror (badblockfilename);exit (1 ); }
Re: [PATCH] palo/palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Hi Jeroen,
Quoted 9 lines · Jeroen Roovers
In file included from
/usr/include/fcntl.h:296:0,from palo.c:16:In function 'open',
inlined from 'do_formatted' at palo.c:482:5:/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open withO_CREATin second argument needs 3 argumentsSigned-off-by Jeroen Roovers <[email protected]>
Thanks for both patches!
I've just pushed both upstream to the palo git tree.
Both changes aren't that huge, so I'm right now not planning to bump the version number - unless you need it for gentoo...?
Just let me know (or if you have further patches, e.g. gentoo specific files?)
Helge
Re: [PATCH] palo/palo.c:482:5: /usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Quoted 2 lines · On Sat, 20 Jul 2013 21:53:10 +0200 Helge Deller <[email protected]> wrote:
Thanks for both patches!
I've just pushed both upstream to the palo git tree.
Great!
Quoted 2 lines
Both changes aren't that huge, so I'm right now not planning to bump the version number - unless you need it for gentoo...?
Both patches are already used in Gentoo, so that's fine.
jer