On 12/06/2011 04:58 AM, Mark R Bannister wrote:
> Hi,
> 
> I'm banging my head against a wall here trying to port nss_db to Solaris 10.
> 
> It includes a source file called makedb.c that requires argp.h and error.h. 
> Incidentally it also requires a Berkeley database which I have in
> /opt/csw/bdb48/include/db.h.
> 
> I thought the easiest thing was to use gnulib to provide the missing argp and
> error functionality.  I couldn't get the git repo (firewall restrictions), so 
> had
> to grab the latest package from here: 
> http://erislabs.net/ianb/projects/gnulib/
> 
> Unfortunately, by importing these gnulib modules I get a new unistd.h that
> includes getopt.h.  The Solaris package SUNWhea also has getopt.h, and now the
> problems really start.

Gnulib getopt should work just fine alongside SUNWhea, if you use it
correctly.

> 
> I imported:
> ./gnulib-tool --import argp error
> and set-up the pre-requisites in configure.in and Makefile.am.
> 
> Here is a very simple test file:
> 
> #include <db.h>

There's your problem.  You have to #include <config.h> prior to any
other include files, if you want gnulib's getopt replacements to work.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to