Tue Dec 2 16:59:03 2008 UTC ()
Be a bit nicer to native linux use and define _GNU_SOURCE here as well.


(joerg)
diff -r1.24 -r1.25 pkgsrc/net/libfetch/files/ftp.c

cvs diff -r1.24 -r1.25 pkgsrc/net/libfetch/files/ftp.c (expand / switch to unified diff)

--- pkgsrc/net/libfetch/files/ftp.c 2008/10/08 15:11:21 1.24
+++ pkgsrc/net/libfetch/files/ftp.c 2008/12/02 16:59:03 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ftp.c,v 1.24 2008/10/08 15:11:21 joerg Exp $ */ 1/* $NetBSD: ftp.c,v 1.25 2008/12/02 16:59:03 joerg Exp $ */
2/*- 2/*-
3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav 3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
4 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org> 4 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer 11 * notice, this list of conditions and the following disclaimer
12 * in this position and unchanged. 12 * in this position and unchanged.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -47,26 +47,31 @@ @@ -47,26 +47,31 @@
47 * 47 *
48 * Incorporated into libfetch 48 * Incorporated into libfetch
49 * 49 *
50 * Jordan K. Hubbard 50 * Jordan K. Hubbard
51 * 17 Jan 1996 51 * 17 Jan 1996
52 * 52 *
53 * Turned inside out. Now returns xfers as new file ids, not as a special 53 * Turned inside out. Now returns xfers as new file ids, not as a special
54 * `state' of FTP_t 54 * `state' of FTP_t
55 * 55 *
56 * $ftpioId: ftpio.c,v 1.30 1998/04/11 07:28:53 phk Exp $ 56 * $ftpioId: ftpio.c,v 1.30 1998/04/11 07:28:53 phk Exp $
57 * 57 *
58 */ 58 */
59 59
 60#ifdef __linux__
 61/* Keep this down to Linux, it can create surprises else where. */
 62#define _GNU_SOURCE
 63#endif
 64
60#if HAVE_CONFIG_H 65#if HAVE_CONFIG_H
61#include "config.h" 66#include "config.h"
62#endif 67#endif
63#ifndef NETBSD 68#ifndef NETBSD
64#include <nbcompat.h> 69#include <nbcompat.h>
65#endif 70#endif
66 71
67#include <sys/types.h> 72#include <sys/types.h>
68#include <sys/socket.h> 73#include <sys/socket.h>
69 74
70#include <arpa/inet.h> 75#include <arpa/inet.h>
71#include <netinet/in.h> 76#include <netinet/in.h>
72 77