Skip to content

Commit

Permalink
sokol_app.h: trigger a linker error if users forget -pthread. Closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
iboB committed Jan 9, 2021
1 parent 924f13b commit a75e2ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sokol_app.h
Expand Up @@ -10030,7 +10030,13 @@ _SOKOL_PRIVATE void _sapp_x11_process_event(XEvent* event) {
}
}

extern int pthread_yield(void); // see below
_SOKOL_PRIVATE void _sapp_linux_run(const sapp_desc* desc) {
// The following line is here to trigger a linker error instead of an
// obscure runtime error if the user has forgotten to add -pthread to
// the compiler or linker options. It has no other purpose.
pthread_yield();

_sapp_init_state(desc);
_sapp.x11.window_state = NormalState;

Expand Down

0 comments on commit a75e2ab

Please sign in to comment.