Skip to content

Conversation

@jeffreyparker
Copy link
Contributor

Summary

  • Include <time.h> before declaring the timegm fallback prototype in acconfig.h
  • Without this include, struct tm is an incomplete type local to the function declaration
  • When config.h is included multiple times (from pam_duo.c:12 and again via pam_extra.h:9), each inclusion creates a different incomplete struct tm type, causing "conflicting types for 'timegm'" compilation errors

This follows the same pattern as other compat functions in acconfig.h (e.g., asprintf includes <stdarg.h>, getgrouplist includes <grp.h>).

Fixes #356

Test plan

  • Build on AIX 7.3 with OpenSSL 3.0 (customer environment that reported the issue)
  • Verify existing CI tests pass

Include <time.h> before declaring the timegm fallback prototype.
Without this, struct tm is an incomplete type local to the function
declaration, causing "conflicting types" errors when config.h is
included multiple times (e.g., from pam_duo.c and pam_extra.h).

Fixes #356
@jeffreyparker jeffreyparker marked this pull request as draft January 22, 2026 15:36
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.

timegm conflicts on AIX

1 participant