microsoft / node-native-keymap

Provide OS keyboard layout functionality as a nodejs module
MIT License
136 stars 37 forks source link

Fix build on FreeBSD 12 #31

Closed tagattie closed 2 years ago

tagattie commented 2 years ago

Include pthread.h for pthread_t to avoid the following build error on FreeBSD 12:

In file included from ../src/keyboard_x.cc:6:
../src/keymapping.h:40:3: error: unknown type name 'pthread_t'; did you mean 'pthread'?
  pthread_t tid;
  ^~~~~~~~~
  pthread
/usr/include/stdio.h:157:9: note: 'pthread' declared here
        struct pthread *_fl_owner;      /* current owner */
               ^
In file included from ../src/keyboard_x.cc:6:
../src/keymapping.h:40:13: error: field has incomplete type 'pthread'
  pthread_t tid;
            ^
/usr/include/stdio.h:157:9: note: forward declaration of 'pthread'
        struct pthread *_fl_owner;      /* current owner */
               ^
2 errors generated.
alexdima commented 2 years ago

Thank you!