pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gcc with openssl on Solaris and NetBSD complains about prototypes


The actual problem I am trying to solve is using gcc from pkgsrc on
Solaris/sparc 10 with OpenSSL from pkgsrc to build a program.

On NetBSD/i386 3.0, the program builds fine with the native OpenSSL but
both on Solaris and NetBSD I see errors/warnings as soon as I use OpenSSL
from pkgsrc:

  /opt/pkg/include/openssl/ui.h:220: warning: function declaration isn't
  a prototype

The function prototype in question is almost perfect, but it has a function
pointer "void (*f)()" as a parameter and the missing void in "()" breaks gcc.

I have reduced the problem to the following short piece of code:

    #include <openssl/ui.h>

    int bla=1;

  $ uname -sr
  NetBSD 3.0
  $ gcc  -Werror -Wstrict-prototypes  -c foo.c -o foo.o

  $ cp -pr /usr/include/openssl .
  $ gcc  -I. -Werror -Wstrict-prototypes  -c foo.c -o foo.o 
  In file included from foo.c:1:
  openssl/ui.h:220: warning: function declaration isn't a prototype

Why does this happen as soon as I use header files from a location other
than /usr/include? The missing "void" is never there but the error only
shows with the non-standard include path.

What am I missing here?


Home | Main Index | Thread Index | Old Index