Skip to content

(winnie) Fix struct stat redefinition - reorder includes#3069

Merged
robe2 merged 1 commit intopgRouting:mainfrom
Mohit242-bit:fix/winnie-main-struct-stat-redefinition
Feb 18, 2026
Merged

(winnie) Fix struct stat redefinition - reorder includes#3069
robe2 merged 1 commit intopgRouting:mainfrom
Mohit242-bit:fix/winnie-main-struct-stat-redefinition

Conversation

@Mohit242-bit
Copy link
Contributor

Fixes #3067 (for main branch)
This PR applies the same struct stat redefinition fix to the main branch, matching the fix already merged into develop via PR #3068.
Changes
Reordered includes in src/cpp_common/report_messages.cpp so that PostgreSQL headers are included before C++ headers, following the pattern used in previous fixes (#2648).

@pgRouting/admins

Copilot AI review requested due to automatic review settings February 18, 2026 13:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a Windows MinGW compilation error in the main branch by reordering includes in src/cpp_common/report_messages.cpp. The issue occurs when C++ standard library headers (which include <sys/stat.h>) are included before PostgreSQL headers that redefine struct stat on Windows, causing redefinition errors. This fix mirrors the solution already applied to the develop branch in PR #3068.

Changes:

  • Reordered includes to place PostgreSQL headers before C++ standard library headers
  • Moved report_messages.hpp include from before the extern "C" block to after <sstream>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robe2 robe2 self-assigned this Feb 18, 2026
@robe2 robe2 self-requested a review February 18, 2026 14:06
@robe2 robe2 merged commit c75f62e into pgRouting:main Feb 18, 2026
63 of 64 checks passed
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

Comments