diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-07-10 01:16:24 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-07-10 01:16:24 +0000 |
commit | 8fd0fb2b98ff00af86fd3ddb028fff4d1b0c5003 (patch) | |
tree | da359d15146e7d177ee74a98e5f4cf92eb39a58c /multimedia/libva | |
parent | multimedia/libva: drop -lpthread on FreeBSD 11.4/12.1/13.0 (diff) |
Add more gettid() aliases to my ports
https://man.openbsd.org/getthrid.2
https://illumos.org/man/3C/thr_self
Notes
Notes:
svn path=/head/; revision=506330
Diffstat (limited to 'multimedia/libva')
-rw-r--r-- | multimedia/libva/files/patch-va_va__trace.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/multimedia/libva/files/patch-va_va__trace.c b/multimedia/libva/files/patch-va_va__trace.c index 3a37bc42e5d5..44530c28d8b6 100644 --- a/multimedia/libva/files/patch-va_va__trace.c +++ b/multimedia/libva/files/patch-va_va__trace.c @@ -2,7 +2,7 @@ --- va/va_trace.c.orig 2019-07-05 13:14:31 UTC +++ va/va_trace.c -@@ -48,12 +48,36 @@ +@@ -48,12 +48,42 @@ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -18,7 +18,9 @@ +#include <pthread_np.h> +#elif defined(__NetBSD__) +#include <lwp.h> -+#else // OpenBSD, Solaris ++#elif defined(__sun) ++#include <thread.h> ++#else // fallback +#include <stdint.h> +#endif + @@ -31,7 +33,11 @@ + return pthread_getthreadid_np(); +#elif defined(__NetBSD__) + return _lwp_self(); -+#else // OpenBSD, Solaris ++#elif defined(__OpenBSD__) ++ return getthrid(); ++#elif defined(__sun) ++ return thr_self(); ++#else // fallback + return (intptr_t) pthread_self(); +#endif +} |