From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/996 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Re: bug? sysinfo() and getopt_long() misbehavior Date: Fri, 8 Jun 2012 20:12:06 +0800 Message-ID: <20120608201206.009e6c7d@sibserver.ru> References: <20120608005148.7d82c40b@sibserver.ru> <20120608031243.GG163@brightrain.aerifal.cx> <20120608132731.042df3b2@sibserver.ru> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1339157646 20922 80.91.229.3 (8 Jun 2012 12:14:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jun 2012 12:14:06 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-997-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 08 14:14:05 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Scy4l-0004aC-A9 for gllmg-musl@plane.gmane.org; Fri, 08 Jun 2012 14:13:59 +0200 Original-Received: (qmail 8146 invoked by uid 550); 8 Jun 2012 12:13:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 8138 invoked from network); 8 Jun 2012 12:13:58 -0000 In-Reply-To: <20120608132731.042df3b2@sibserver.ru> X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:996 Archived-At: > Binutils 2.20, musl compiled with -Bsymbolic-functions. But statically > or dynamically linked iptables still rejects to accept arguments. > It required ugly fix to work, mostly same as iproute2, removing some > non-conformant extensions, correct headers, maybe there is a fault. It > also expects somewhere that we have glibc (#ifdef __GLIBC__) headers. > Maybe it's code is non-conformant in whole. I will try to see where it > fails on host. Iptables fails because it sets optind to zero and getopt_long immidately returns with -1 in the first line (argv[0][0] != '-'). But problem does not fixed with just removing 'optind = 0;' from source code. For what reason one can set optind to zero?