Skip to content

autotools: recognize more Linux targets when setting -D_GNU_SOURCE - #17524

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:am-accept4-uclinux
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:am-accept4-uclinux

Conversation

@vszakats

@vszakats vszakats commented Jun 2, 2025 •

Copy link
Copy Markdown
Member

To set -D_GNU_SOURCE.

Required to declare accept4 on uclibc targets. host_os can have
the value uclinux-uclibcgnueabi in this case.

Fixing:

cf-socket.c: In function 'cf_tcp_accept_connect':
cf-socket.c:2141:18: error: implicit declaration of function 'accept4'; did you mean 'accept'? [-Werror=implicit-function-declaration]
 2141 |     s_accepted = accept4(ctx->sock, (struct sockaddr *) &add, &size,

Follow-up to 3d02872 #16979

Reported-by: Kadambini Nema
Fixes #17512

To set `-D_GNU_SOURCE`.

Required to declare `accept4` on uclibc targets. `host_os` may have
the value `uclinux-uclibcgnueabi` in this case.

Follow-up to 3d02872 curl#16979

May fix curl#17512
Reported-by: Kadambini Nema
@vszakats vszakats added the build label Jun 2, 2025
@vszakats vszakats closed this in 741748e Jun 3, 2025
@vszakats
vszakats deleted the am-accept4-uclinux branch June 3, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Build failure with armv7m/m68k uClibc-ng-1.0.50

2 participants