From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14469 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeeyong Um Newsgroups: gmane.linux.lib.musl.general Subject: build fail with message "error: redefinition of 'index' as different kind of symbol" Date: Wed, 31 Jul 2019 00:31:17 +0900 Message-ID: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cd10a6058ee7b338" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="133716"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14485-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jul 30 17:31:49 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hsU6P-000YZg-DP for gllmg-musl@m.gmane.org; Tue, 30 Jul 2019 17:31:49 +0200 Original-Received: (qmail 3384 invoked by uid 550); 30 Jul 2019 15:31:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3347 invoked from network); 30 Jul 2019 15:31:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=4OLydbYTqiwb+buP7SyZA9PgMqNjkPZlaFeXY8KVCgc=; b=HqGHHlPSyXoaAzJTDCXKcc/MT/vSY945iqlJ/tUrbGoDka/mHEOaxhm31dUau7SSy2 dK2lWuRnP0FQDFkdeSeJZo9908vbYOuZRN2EVObnNsctrblxMBvQ45aIVflvPyNClxnc FmoBnNE+EZRTgEPOqMCxR7E+A71265lBx61S5AYlpONCKx6vLcWvvmio4/gZzw2cv9H2 Jgh1rLM+G0FSFS9yukTRI5/s62W4Nm1TWGaShBCVz30t7fdbhfS+4oq1jpPQCs3zs2Rz yv+ukVP6vxxCHHFpZqO6spfN8G0sW5xyQsARwgZP4sDinlSk7eNwHlQv5DAGm9u0KPHi Q0jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=4OLydbYTqiwb+buP7SyZA9PgMqNjkPZlaFeXY8KVCgc=; b=dIlKUlKaNHbPTz9RUcIcAD5kucsjBfEp1dRJTBSIXvYnQDY66vJPHdAUIt+cCl5136 dtffuBzvWdAhP00OehRUFdYtjyV+ookNhsw5Piv3ioNvqu6DfcDkdnR3niUARgkn0kUF Zqkw0xwpHxonj6a4hJthtlWSTip52eTzrj8xgMkjuPHbkgQJ6Bz6wJobYlhfZmbd8N53 PSo+u/A2kZlpaVe3L9uFIMxF1pcrrGPOAFfeYUvC6qb6DNv0fOcEcsBiCry4lGhZHJ6X v9udU3VF9wA6rOeYqMhnavQn96qWf7BaVBWuT7+jHQ7dB4QrUJ93wlybKs0hQ6Irfvjp zlZw== X-Gm-Message-State: APjAAAVxwFOB7tEOqZ4jl3uBzded3HgdYgpyR+uZ6bic+jmNlIQaE6Tu 3xndhf/0YA+tM1yB9G9rfZL/8wmERJKSI5HjU3dEmxYS X-Google-Smtp-Source: APXvYqzHb9fYPmSGVHZg8KTAJkm918lMtbfDVdVIgHblpKecGS31H9Vw9Elmh9r9FG5ko9gSqc889IiahTjBCCLKEEY= X-Received: by 2002:ab0:70b1:: with SMTP id q17mr7149578ual.100.1564500688702; Tue, 30 Jul 2019 08:31:28 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:14469 Archived-At: --000000000000cd10a6058ee7b338 Content-Type: text/plain; charset="UTF-8" Hello. I have a question about building musl with `_BSD_SOURCE` definition. `src/time/__tz.c` has static variable named by `index` (line 25) and include `string.h` header file (line 5). 5 #include 25 static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end; By the way, `include/string.h` includes `strings.h` when _BSD_SOURCE is defined (line 57). 56 #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) 57 #include 58 #endif `include/strings.h` has a function named by `index` too (line 19). 13 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_POSIX_SOURCE) \ 14 || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 < 200809L) \ 15 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) 16 int bcmp (const void *, const void *, size_t); 17 void bcopy (const void *, void *, size_t); 18 void bzero (void *, size_t); 19 char *index (const char *, int); 20 char *rindex (const char *, int); 21 #endif Is it possible to build musl with _BSD_SOURCE definition in this case? Even though `static` modifier limits the scope of variable to the file, the conflict between `index` of `strings.h` and `index` of `__tz.c` seems unavoidable. Please let me know if you find any mistakes here. Regards, Jeeyong Um --000000000000cd10a6058ee7b338 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.
I have a question about building mus= l with `_BSD_SOURCE` definition.

`src/time/__tz.c`= has static variable named by `index` (line 25) and include `string.h` head= er file (line 5).
5=C2=A0 #include <string.h>
25 static const unsigned char *zi, *trans,= *index, *types, *abbrevs, *abbrevs_end;

By= the way, `include/string.h` includes `strings.h` when _BSD_SOURCE is defin= ed (line 57).
5= 6 #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
57 #include <strin= gs.h>
58 #endif

`include/strings.h` h= as a function named by `index` too (line 19).
13 #if defined(_GNU_SOURCE) || defined(_BSD_= SOURCE) || defined(_POSIX_SOURCE) \
14=C2=A0 || (defined(_POSIX_C_SOURCE= ) && _POSIX_C_SOURCE+0 < 200809L) \
15=C2=A0 || (defined(_XOP= EN_SOURCE) && _XOPEN_SOURCE+0 < 700)
16 int bcmp (const void = *, const void *, size_t);
17 void bcopy (const void *, void *, size_t);<= br>18 void bzero (void *, size_t);
19 char *index (const char *, int);20 char *rindex (const char *, int);
21 #endif

Is it possible to build musl with _BSD_SOURCE definition in this c= ase?
Even though `static` modifier limits the scope of variable t= o the file, the conflict between `index` of `strings.h` and `index` of `__t= z.c` seems unavoidable.
Please let me know if you find any mistak= es here.

Regards,
Jeeyong Um
--000000000000cd10a6058ee7b338--