Skip to content

Comments

Build fixes for Windows#2162

Merged
atomicturtle merged 2 commits intoossec:mainfrom
atomicturtle:external-01
Jan 19, 2026
Merged

Build fixes for Windows#2162
atomicturtle merged 2 commits intoossec:mainfrom
atomicturtle:external-01

Conversation

@atomicturtle
Copy link
Member

Minor updates for more modern ming compiler support

Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
Copy link
Contributor

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 pull request addresses build compatibility issues with modern MinGW compilers by properly separating global variable declarations from their definitions. Modern C compilers (GCC 10+) default to -fno-common, which treats multiple definitions of the same global variable as an error rather than merging them. This PR follows the correct C pattern by using extern declarations in header files and providing single definitions in source files.

Changes:

  • Converted global variable declarations in header files to extern declarations
  • Added corresponding definitions of these global variables in appropriate .c files
  • Affected variables: ui_server_info, config_inst, hStatus (Win32 UI), and isVista (Windows version detection)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/win32/ui/os_win32ui.h Added extern keywords to three global variable declarations (ui_server_info, config_inst, hStatus)
src/win32/ui/os_win32ui.c Added definitions for the three Win32 UI global variables that were previously declared in the header
src/headers/file_op.h Added extern keyword to isVista variable declaration
src/shared/file_op.c Added definition of isVista variable within the WIN32 conditional block

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@atomicturtle atomicturtle merged commit dc69199 into ossec:main Jan 19, 2026
@atomicturtle atomicturtle deleted the external-01 branch January 19, 2026 19:58
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.

1 participant