# HG changeset patch # User Franz Glasner # Date 1664227590 -7200 # Node ID 8fb0be047961532a64263fd5148ea5f891d0a71e # Parent 60f751ce41dd16a3d6d43a9c5b312d84ffeca97e Patch tornado.c to compile with clang 13.0. To cast an enum to void* and vice versa use an intermediate cast to uintptr_t. diff -r 60f751ce41dd -r 8fb0be047961 uwsginl/files/patch-plugins_tornado_tornado.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/patch-plugins_tornado_tornado.c Mon Sep 26 23:26:30 2022 +0200 @@ -0,0 +1,16 @@ +--- plugins/tornado/tornado.c.orig 2022-09-26 21:23:21 UTC ++++ plugins/tornado/tornado.c +@@ -35,11 +35,11 @@ static struct uwsgi_option tornado_options[] = { + }; + + static void gil_tornado_get() { +- pthread_setspecific(up.upt_gil_key, (void *) PyGILState_Ensure()); ++ pthread_setspecific(up.upt_gil_key, (void *) (uintptr_t) PyGILState_Ensure()); + } + + static void gil_tornado_release() { +- PyGILState_Release((PyGILState_STATE) pthread_getspecific(up.upt_gil_key)); ++ PyGILState_Release((PyGILState_STATE) (uintptr_t) pthread_getspecific(up.upt_gil_key)); + } + + static int uwsgi_tornado_wait_read_hook(int fd, int timeout) {