Bug 14918 – Undefined reference when using a static array of pollfd's

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-08-13T19:15:36Z
Last change time
2020-02-13T03:21:13Z
Keywords
pull
Assigned to
No Owner
Creator
Alex Parrill
Depends on
14992

Comments

Comment #0 by initrd.gz — 2015-08-13T19:15:36Z
This code: import core.sys.posix.poll; void main() { pollfd[5] entry; } Produces the following error when compiling: > rdmd ~/test.d /tmp/.rdmd-1000/rdmd-test.d-F32582916A80A29195884B844D6EB219/objs/test.o: In function `_Dmain': /home/col/test.d:(.text._Dmain+0x10): undefined reference to `_D4core3sys5posix4poll6pollfd6__initZ' collect2: error: ld returned 1 exit status --- errorlevel 1
Comment #1 by initrd.gz — 2015-08-13T19:16:55Z
Forgot to mention: I'm running DMD 2.068.0 on x64 XUbuntu 14.04.3
Comment #2 by dlang-bugzilla — 2015-09-01T09:02:58Z
Workaround: pollfd[5] entry = void;
Comment #3 by dlang-bugzilla — 2015-09-01T09:28:39Z
Filed underlying issue 14992
Comment #4 by dlang-bugzilla — 2015-09-01T09:38:12Z
Comment #5 by kubo39 — 2020-02-12T20:25:30Z
Comment #6 by dlang-bugzilla — 2020-02-13T03:21:13Z
Yes, works since 2.071.0.