Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD 7.2+ redeclaration strndup() #4259

Closed
DorpsGek opened this issue Nov 22, 2010 · 4 comments
Closed

FreeBSD 7.2+ redeclaration strndup() #4259

DorpsGek opened this issue Nov 22, 2010 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

MicRO opened the ticket and wrote:

Build openttd, see:
In file included from /usr/ports/games/openttd/work/openttd-1.0.5/src/string.cpp:16:
/usr/ports/games/openttd/work/openttd-1.0.5/src/string_func.h:281: warning: redundant redeclaration of 'char* strndup(const char*, size_t)' in same scope
/usr/include/string.h:100: warning: previous declaration of 'char* strndup(const char*, size_t)'

The strdup() function first appeared in 4.4BSD. The strndup() function
was added in FreeBSD 7.2.

Patch in attach.
Please test it, thx

Best regard.

Attachments

Reported version: Version?
Operating system: *BSD


This issue was imported from FlySpray: https://bugs.openttd.org/task/4259
@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Implemented

In r21295


This comment was imported from FlySpray: https://bugs.openttd.org/task/4259

@DorpsGek
Copy link
Member Author

MicRO wrote:

FreeBSD has strndup(3) since 701101.
Please fix, it. Thx.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4259#comment9164

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Why did they add a new function in a minor release? In any case, it's changed in trunk.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4259#comment9166

@DorpsGek
Copy link
Member Author

MicRO wrote:

Sorry it's my mistake...


This comment was imported from FlySpray: https://bugs.openttd.org/task/4259#comment9167

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant