Skip to content

Fix building c-ares-1.22.0 and higher under Watcom. - #623

Merged
bradh352 merged 3 commits into
c-ares:mainfrom
renodr:renodr-watcom-add-stdinth
Nov 15, 2023
Merged

bradh352 merged 3 commits into
c-ares:mainfrom
renodr:renodr-watcom-add-stdinth

Conversation

@renodr

@renodr renodr commented Nov 15, 2023 •

Copy link
Copy Markdown
Contributor

This commit fixes building c-ares using the WATCOM compiler by adding -dHAVE_STDINT_H into the CFLAGS. On a configure or CMake based configuration, this would be added in by that process.

This fixes a build error when compiling ares__buf.c, due to not having SIZE_MAX declared.

Tested by linking to the library as well as using adig and ahost.

Fixes #622

@renodr

renodr commented Nov 15, 2023

Copy link
Copy Markdown
Contributor Author

The two CI fails are unrelated (connections to deb.debian.org timed out)

This commit fixes building c-ares using the WATCOM compiler by adding
-dHAS_STDINT_H into the CFLAGS. On a configure or CMake based
configuration, this would be added in by that process.

This fixes a build error when compiling ares__buf.c, due to not having
SIZE_MAX declared.

Tested by linking to the library as well as using adig and ahost.

Fixes c-ares#622
@bradh352

Copy link
Copy Markdown
Member

I wonder if it wouldn't be better to add this to src/lib/config_win32.h if openwatcom is in use? I assume you're using the static makefile.Watcom, in which case I'm pretty sure that config_win32.h is in use in that case.

@renodr

renodr commented Nov 15, 2023

Copy link
Copy Markdown
Contributor Author

Yeah I'm using the static Makefile.Watcom, but I'm thinking putting it in src/lib/config_win32.h may be a better approach as well. I'll try that locally and then add another commit to the PR going that route

@bradh352

Copy link
Copy Markdown
Member

When you do commit, hopefully it triggers the workflow on the c-ares CI/CD system now to build using OpenWatcom

@bradh352
bradh352 merged commit 6988705 into c-ares:main Nov 15, 2023
This is an alternate method of fixing the build failure that doesn't
involve a change to the Makefile and makes it so that it works
regardless of the build system in use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building using the WATCOM compiler fails

2 participants