utpala m wrote: > I am including "unistd.h " in my code which inturn includes getopt.h. > getopt.h is available in two locations > /usr/include/ > /usr/local/include/netsnmp/library/ (when netsnmp is installed on the > system) > > To include the net-snmp header files "/usr/local/include/netsnmp/library/" > is also specifed in the include path. > as a result compiler picks up getopt.h from > "/usr/local/include/netsnmp/library/" instead of "/usr/include/" while > including unistd.h > How do I go about including getopt.h from /usr/include/ while using system > provided header files like unistd.h
You shouldn't add "/usr/local/include/netsnmp/library/" to your include path. I'd rather suggest to add the output of "net-snmp-config --cflags" to your CFLAGS which is likely to contain "-I/usr/local/include" in your case. If you need to include some header file /usr/local/include/netsnmp/library/xxx.h, please do: #include <net-snmp/library/xxx.h> +Thomas -- Thomas Anders (thomas.anders at blue-cable.de) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders