[gnutls-devel] GnuTLS | Build failure without threads (#1330)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Mar 4 21:51:28 CET 2022




Fabrice Fontaine commented:


Unfortunately, turning `gnutls_static_mutex_lock` into a macro doesn't fix the issue. `lock` will still be undefined. Indeed, the issue is due to `GNUTLS_STATIC_MUTEX`, not `gnutls_static_mutex_lock`. It should be noted that the same build failure is raised with `gnutls_rwlock_rdlock`:

```
priority.c: In function '_gnutls_update_system_priorities':
priority.c:1857:30: error: 'system_wide_config_rwlock' undeclared (first use in this function); did you mean 'system_wide_config'?
 1857 |  ret = gnutls_rwlock_rdlock(&system_wide_config_rwlock);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                              system_wide_config
```

A possible workaround is to guard all mutexes (i.e. `file_mutex`, `global_init_mutex`, `keylog_mutex`, `gnutls_rnd_ctx_list_mutex` and `system_wide_config_rwlock`) by `ifdef HAVE_PTHREAD_MUTEX_LOCK`. I can send a MR if this is acceptable. An other option is to disable gnutls on toolchains without threads.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1330#note_863539390
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220304/606861ee/attachment.html>


More information about the Gnutls-devel mailing list