Skip to content

\libraries\WiFi101\src/socket/include/socket.h:1839:15: error: conflicting declaration of C function 'sint8 close(SOCKET)' #30

@huster-songtao

Description

@huster-songtao
In file included from d:\Arduino\Sketchbook\libraries\WiFi101\src/WiFiClient.h:28,
                 from d:\Arduino\Sketchbook\libraries\WiFi101\src/WiFi101.h:35,
                 from C:\Users\tao\AppData\Local\Temp\.arduinoIDE-unsaved2024025-8816-1pfxd5m.1slaf\WiFiResolvingHostNames\WiFiResolvingHostNames.ino:25:
d:\Arduino\Sketchbook\libraries\WiFi101\src/socket/include/socket.h:1839:15: error: conflicting declaration of C function 'sint8 close(SOCKET)'
 NMI_API sint8 close(SOCKET sock);
               ^~~~~
In file included from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32c3/include/newlib/platform_include/sys/unistd.h:23,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\unistd.h:4,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\pthread.h:25,
                 from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14/tools/sdk/esp32c3/include/newlib/platform_include/pthread.h:21,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\riscv32-esp-elf\rv32imc\ilp32\no-rtti\bits\gthr-default.h:48,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\riscv32-esp-elf\rv32imc\ilp32\no-rtti\bits\gthr.h:151,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\ext\atomicity.h:35,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\bits\basic_string.h:39,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\string:52,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\stdexcept:39,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\array:39,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\tuple:39,
                 from c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\include\c++\8.4.0\functional:54,
                 from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/HardwareSerial.h:49,
                 from C:\Users\tao\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\cores\esp32/Arduino.h:184,
                 from C:\Users\tao\AppData\Local\Temp\arduino\sketches\63ADCEAE1835CF6FB6AEF0D323A2C879\sketch\WiFiResolvingHostNames.ino.cpp:1:
c:\users\tao\appdata\local\arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\riscv32-esp-elf\sys-include\sys\unistd.h:30:9: note: previous declaration 'int close(int)'
 int     close (int __fildes);
         ^~~~~

exit status 1

Compilation error: exit status 1

Metadata

Metadata

Assignees

Labels

topic: documentationRelated to documentation for the projecttype: imperfectionPerceived defect in any part of projecttype: supportOT: Request for help using the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions