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

Fix compile error on macOS: unknown type name 'ulong' #5207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cwalther
Copy link
Contributor

@cwalther cwalther commented Jan 9, 2025

Trying to build cyrus-imapd on macOS (12.5–15.2) fails with a compiler error unknown type name 'ulong' in imap/http_client.h and imap/httpd.h (even with no HTTP features enabled). That type does not appear to be defined anywhere in the source code.

Checking on Linux, it appears to be a Linux-specific thing, in my case coming from the following part of /usr/include/x86_64-linux-gnu/sys/types.h:

#ifdef __USE_MISC
/* Old compatibility names for C types.  */
typedef unsigned long int ulong;

Using that typedef does not seem to add any value, replace it by the standard type.

@rjbs rjbs self-requested a review January 13, 2025 15:05
@rjbs rjbs self-assigned this Jan 13, 2025
@rjbs
Copy link
Collaborator

rjbs commented Jan 13, 2025

Seems like this should also patch imap/jmap_mail_submission.c. Will get this sorted.

@cwalther
Copy link
Contributor Author

Ah, good point. It didn’t occur to me to search for all occurrences, I just fixed what got in my way, and I didn’t have JMAP enabled.

@rjbs
Copy link
Collaborator

rjbs commented Jan 13, 2025

@cwalther Could you click "Allow edits and access to secrets by maintainers" on this PR? Failing that, I'll make a new one based on it, tomorrow.

@cwalther
Copy link
Contributor Author

I don’t see that checkbox anymore. It used to be in the right sidebar, right?
But I can force-push an amended commit with the additional change to jmap_mail_submission.c.

This appears to be a Linux-specific thing, coming from /usr/include/x86_64-linux-gnu/sys/types.h:

  #ifdef __USE_MISC
  /* Old compatibility names for C types.  */
  typedef unsigned long int ulong;

Signed-off-by: Christian Walther <[email protected]>
@cwalther
Copy link
Contributor Author

GitHub Docs say

On user-owned forks, if you want to allow anyone with push access to the upstream repository to make changes to your pull request, select Allow edits from maintainers.

so maybe the checkbox isn’t there because this is an organization-owned fork (no idea why that should make a difference).

Anyway, if the new commit isn’t what you wanted, let me know or proceed with the previous one as you wish.

@rjbs
Copy link
Collaborator

rjbs commented Jan 13, 2025

Thanks! I expect I'll merge this tomorrow when I'm back on the clock! 👍🏽

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.

2 participants