# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/socat/hotfix-const-correctness.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- socat-1.8.1.0/filan.c.vanilla +++ socat-1.8.1.0/filan.c @@ -1112,7 +1112,9 @@ } else { fputc('\t', outfile); s = asctime(localtime(&time)); - if (strchr(s, '\n')) *strchr(s, '\n') = '\0'; + char *nl; + if ((nl = strchr((char *)s, '\n')) != NULL) + *nl = '\0'; fputs(s, outfile); } return 0;