jamienicol / glslopt-rs

Rust bindings to https://github.com/jamienicol/glsl-optimizer
4 stars 8 forks source link

Fix build on FreeBSD/DragonFly #5

Closed valpackett closed 4 years ago

valpackett commented 4 years ago

This fixes

cargo:warning=glsl-optimizer/src/util/u_thread.h:83:4: error: use of undeclared identifier 'pthread_set_name_np'; did you mean 'pthread_setname_np'?

(encountered when building Firefox)

jamienicol commented 4 years ago

Thanks for the PR! (and sorry for breaking your build!) You don't happen to know if netBSD/openBSD need the same fix too, do you?

valpackett commented 4 years ago

I think PTHREAD_SETAFFINITY_IN_NP_HEADER wouldn't be defined by Mesa's actual build system on NetBSD and OpenBSD, because setaffinity is not in the _np header there. But they probably do need pthread_np to be included there for the set_name. hmm. Better to have someone actually test this.

jamienicol commented 4 years ago

Okay, in that case my inclination is to land this as is, and if someone files a bug about NetBSD/OpenBSD then we can deal with that later. Could you please file a bug on bugzilla about this too, and I'll merge this PR, release a new version of glslopt, and update gecko. Thanks!

valpackett commented 4 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1656210