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

rpc: include <limits.h> for definition of ULONG_MAX #660

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

alanc
Copy link
Contributor

@alanc alanc commented Oct 11, 2024

Fixes build failure on Solaris 11.4 with gcc 14.2:

../p11-kit/rpc-server.c: In function ‘proto_read_attribute_buffer_array’:
../p11-kit/rpc-server.c:289:46: error: ‘ULONG_MAX’ undeclared (first use in this function)
  289 |                         if ((n_array != 0 && ULONG_MAX / n_array < sizeof (CK_ATTRIBUTE)) ||
      |                                              ^~~~~~~~~
../p11-kit/rpc-server.c:64:1: note: ‘ULONG_MAX’ is defined in header ‘<limits.h>’; this is probably fixable by adding ‘#include <limits.h>’

Fixes build failure on Solaris 11.4 with gcc 14.2:
../p11-kit/rpc-server.c: In function ‘proto_read_attribute_buffer_array’:
../p11-kit/rpc-server.c:289:46: error: ‘ULONG_MAX’ undeclared (first use in this function)
  289 |                         if ((n_array != 0 && ULONG_MAX / n_array < sizeof (CK_ATTRIBUTE)) ||
      |                                              ^~~~~~~~~
../p11-kit/rpc-server.c:64:1: note: ‘ULONG_MAX’ is defined in header ‘<limits.h>’; this is probably fixable by adding ‘#include <limits.h>’

Signed-off-by: Alan Coopersmith <[email protected]>
Copy link
Member

@ueno ueno left a comment

Choose a reason for hiding this comment

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

Thank you for spotting it.

@coveralls
Copy link

Coverage Status

coverage: 69.565% (+0.03%) from 69.54%
when pulling f0c41ea on alanc:solaris
into a8b9464 on p11-glue:master.

@ueno ueno merged commit e3460db into p11-glue:master Oct 11, 2024
14 checks passed
@alanc alanc deleted the solaris branch November 1, 2024 17:53
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.

3 participants