# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/driftnet/hotfix-lws-mount.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- Designated initializers, libwebsockets 5 changed the lws_http_mount layout. --- driftnet-1.6.0.orig/src/http_display/httpd.c +++ driftnet-1.6.0/src/http_display/httpd.c @@ -177,26 +177,12 @@ static void * http_server_dispatch(void }; const struct lws_http_mount mount = { - (struct lws_http_mount *)NULL, /* linked-list pointer to next*/ - "/", /* mountpoint in URL namespace on this vhost */ - server_root, /* where to go on the filesystem for that */ - "index.html", /* default filename if none given */ - NULL, - NULL, - mime_types, - NULL, - 0, - 0, - 0, - 0, - 0, - 0, - LWSMPRO_FILE, /* mount type is a directory in a filesystem */ - 1, /* strlen("/"), ie length of the mountpoint */ - NULL, -#if LWS_LIBRARY_VERSION_MAJOR <= 4 && LWS_LIBRARY_VERSION_MINOR < 3 - { NULL, NULL } // sentinel -#endif + .mountpoint = "/", /* mountpoint in URL namespace on this vhost */ + .origin = server_root, /* where to go on the filesystem for that */ + .def = "index.html", /* default filename if none given */ + .extra_mimetypes = mime_types, + .origin_protocol = LWSMPRO_FILE, /* mount type is a directory in a filesystem */ + .mountpoint_len = 1, /* strlen("/"), ie length of the mountpoint */ }; memset(&info, 0, sizeof info);