Skip to content

Fix Windows (MinGW) build: replace strcasestr with gpredict_strcasestr - #447

Closed
homes32 wants to merge 1 commit into
csete:masterfrom
homes32:master
Closed

homes32 wants to merge 1 commit into
csete:masterfrom
homes32:master

Conversation

@homes32

@homes32 homes32 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Problem

make in win32/ fails under MSYS2/MinGW64:

../src/gtk-rig-ctrl.c:1069:24: error: implicit declaration of function 'strcasestr'

strcasestr() is a GNU extension and isn't in the MinGW C runtime. gtk-rot-ctrl.c has the same call.

Fix

  • The satellite filter callbacks in gtk-rig-ctrl.c and gtk-rot-ctrl.c now use the existing portable gpredict_strcasestr() from gpredict-utils.c.
  • Removed #define _GNU_SOURCE and its comments from those two files and from gtk-sat-selector.c (which alread uses the utility function) since they were only needed for strcasestr.

strcasestr() is a GNU extension that MinGW doesn't provide causing the win32 build to fail.
@plopaur

plopaur commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

nice find, as you have a working windows development environment could you please check the windows related part of my pr #442 if the NEWS and other files have or should have the .txt extension or not? thanks

@csete

csete commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Thanks for the patch. These changes were also included in #449, except the removal of #define _GNU_SOURCE, which I have removed manually.

@csete csete closed this Nov 14, 2026
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