Skip to content

build: require POSIX strdup()#20505

Closed
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:reqstrdup
Closed

build: require POSIX strdup()#20505
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:reqstrdup

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Feb 3, 2026

Stop detecting this function and drop the local fallback.

Let us know if this update is causing an issue.

Notes:

  • on Windows _strdup() is required instead.
  • strdup()/_strdup() were required before this patch to build one of
    the examples: block_ip.
  • strdup()/_strdup() were required in 8.18.0 and earlier to build
    tests.

This requirement was already present for building tests and one of
the examples.
not a requirement. The compiler must support a 64-bit integer type as well as
supply a stdint.h header file that defines C99-style fixed-width integer types
like uint32_t.
like uint32_t. The compiler must also support POSIX `strdup()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since line 16 already mentions that POSIX is assumed, I don't think this addition is necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with keeping it as short and simple. Pushed a commit to keep it as-is.

@vszakats vszakats closed this in 0590753 Feb 3, 2026
@vszakats vszakats deleted the reqstrdup branch February 3, 2026 16:50
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.

3 participants