Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/unzip Build with linux/glibc (Alex Kozlov)



details:   https://anonhg.NetBSD.org/src/rev/41fe0e4a4225
branches:  trunk
changeset: 959553:41fe0e4a4225
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 18 17:05:51 2021 +0000

description:
Build with linux/glibc (Alex Kozlov)

diffstat:

 usr.bin/unzip/unzip.c |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r ffc06e495cfa -r 41fe0e4a4225 usr.bin/unzip/unzip.c
--- a/usr.bin/unzip/unzip.c     Thu Feb 18 17:04:39 2021 +0000
+++ b/usr.bin/unzip/unzip.c     Thu Feb 18 17:05:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.24 2018/07/19 18:04:25 joerg Exp $ */
+/* $NetBSD: unzip.c,v 1.25 2021/02/18 17:05:51 christos Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 Joerg Sonnenberger <joerg%NetBSD.org@localhost>
@@ -37,7 +37,11 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: unzip.c,v 1.24 2018/07/19 18:04:25 joerg Exp $");
+__RCSID("$NetBSD: unzip.c,v 1.25 2021/02/18 17:05:51 christos Exp $");
+
+#ifdef __GLIBC__
+#define _GNU_SOURCE
+#endif
 
 #include <sys/queue.h>
 #include <sys/stat.h>
@@ -936,7 +940,13 @@
 {
        int opt;
 
-       optreset = optind = 1;
+#ifdef __GLIBC__
+       optind = 0;
+#else
+       optreset = optind = 1;
+#endif
+
+       while ((opt = getopt(argc, argv, "aCcd:fjLlnopP:qtuvyx:")) != -1)
        while ((opt = getopt(argc, argv, "aCcd:fjLlnopqtuvyx:")) != -1)
                switch (opt) {
                case 'a':



Home | Main Index | Thread Index | Old Index