Fixing warnings on Solaris.
pthread_t on Solaris is an integer type with size not equal to pointer size. To avoid warnings, type casts to and from pointer needs to be done via uintptr_t type. This change originally proposed by Juraj Lutter <juraj@lutter.sk>.
This commit is contained in:
@@ -3785,7 +3785,7 @@ nxt_unit_shm_open(nxt_unit_ctx_t *ctx, size_t size)
|
||||
char name[64];
|
||||
|
||||
snprintf(name, sizeof(name), NXT_SHM_PREFIX "unit.%d.%p",
|
||||
lib->pid, (void *) pthread_self());
|
||||
lib->pid, (void *) (uintptr_t) pthread_self());
|
||||
#endif
|
||||
|
||||
#if (NXT_HAVE_MEMFD_CREATE)
|
||||
|
||||
Reference in New Issue
Block a user