From c83741eb06032940cd6f790356df68fb48974d18 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 8 Jan 2021 11:50:15 +0700 Subject: [PATCH] ptsname() needs _GNU_SOURCE on glibc. (#192) glibc needs `_XOPEN_SOURCE` to have a declaration for `ptsname()`. An easy way to get that without having to know about particular `_XOPEN_SOURCE` values is to define `_GNU_SOURCE`. Closes interlisp/medley#137. --- src/unixcomm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unixcomm.c b/src/unixcomm.c index ea02471..ead7fdf 100644 --- a/src/unixcomm.c +++ b/src/unixcomm.c @@ -9,6 +9,10 @@ Unix Interface Communications /* Don't compile this at all under DOS. */ #ifndef DOS +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* Needed for ptsname on glibc systems. */ +#endif + /************************************************************************/ /* */ /* (C) Copyright 1989-1995 by Venue. All Rights Reserved. */