Fix warnings under BSD

This commit is contained in:
Timothy Redaelli 2010-05-04 15:43:48 +02:00 committed by Guus Sliepen
parent df985256a7
commit eda7179874
2 changed files with 18 additions and 10 deletions

View file

@ -44,6 +44,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* Comment out all this code if we are using the GNU C Library, and are not /* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling Library, but also included in many other GNU distributions. Compiling
@ -688,16 +692,18 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else else
{ {
if (opterr) if (opterr)
if (argv[optind - 1][1] == '-') {
/* --option */ if (argv[optind - 1][1] == '-')
fprintf (stderr, /* --option */
"%s: option `--%s' doesn't allow an argument\n", fprintf (stderr,
argv[0], pfound->name); "%s: option `--%s' doesn't allow an argument\n",
else argv[0], pfound->name);
/* +option or -option */ else
fprintf (stderr, /* +option or -option */
"%s: option `%c%s' doesn't allow an argument\n", fprintf (stderr,
argv[0], argv[optind - 1][0], pfound->name); "%s: option `%c%s' doesn't allow an argument\n",
argv[0], argv[optind - 1][0], pfound->name);
}
nextchar += strlen (nextchar); nextchar += strlen (nextchar);

View file

@ -365,7 +365,9 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
vpn_packet_t *outpkt; vpn_packet_t *outpkt;
int origlen; int origlen;
int outlen, outpad; int outlen, outpad;
#if defined(SOL_IP) && defined(IP_TOS)
static int priority = 0; static int priority = 0;
#endif
int origpriority; int origpriority;
int sock; int sock;