Skip to contentSkip to conversation

libmount python bindings and header includes

DISCUSSION Mike Frysinger 2 participants 2 messages Apr 12, 2016 – Apr 18, 2016 Util-Linux package

lore
Share & tools
lore
#0 lore raw

i'm currently seeing these build warnings:
libmount/python/fs.c:110:40: warning: implicit declaration of function 'major' libmount/python/fs.c:111:7: warning: implicit declaration of function 'minor'

this is handled for most of the code in include/c.h:
#ifdef HAVE_SYS_SYSMACROS_H

# include <sys/sysmacros.h>     /* for major, minor */
#endif

but the python code doesn't include that header. i'm not sure what the preference is here (make the python code pull in that header or just copy over the sysmacros.h logic), so i'm skipping writing a patch. -mike

maintainer
#1 lore raw
Quoted 4 lines · Mike Frysinger

i'm currently seeing these build warnings:
libmount/python/fs.c:110:40: warning: implicit declaration of function 'major' libmount/python/fs.c:111:7: warning: implicit declaration of function 'minor'

Quoted 8 lines

this is handled for most of the code in include/c.h:
#ifdef HAVE_SYS_SYSMACROS_H

# include <sys/sysmacros.h>     /* for major, minor */
#endif

but the python code doesn't include that header. i'm not sure what the preference is here (make the python code pull in that header or just copy over the sysmacros.h logic), so i'm skipping writing a patch.

Our c.h is so wonderful that it's expected everywhere :) Fixed.

Thanks!
Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com