head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.04.23.21.23.11; author kim; state Exp; branches; next ; commitid gOPq0jBzZQ1c08DG; desc @@ 1.1 log @lsof: Do not include _STABLE, _RC, etc. suffixes in version comparison. Avoid (some) unnecessary system version warnings on NetBSD. The ABI should not change between 11.0_BETA, 11.0_RC*, 11.0, and 11.0_STABLE. In fact it should not change between 11.0, 11.1, 11.2, and so forth. The only exception is *.99.* (e.g. 11.99.5), where the full version should be compared. XXX: This could be improved to only compare the major version when the minor version is less than 99. @ text @$NetBSD$ Do not include _STABLE, _RC, etc. suffixes in version comparison. --- dialects/n+obsd/dproc.c.orig 2005-05-11 15:54:00.000000000 +0300 +++ dialects/n+obsd/dproc.c 2025-07-18 11:02:20.123676193 +0300 @@@@ -81,6 +81,19 @@@@ Pn, strerror(errno)); Exit(1); } + +#ifdef __NetBSD__ +/* + * Major release version indicates ABI compatibility. + */ + { + char *vp; + vp = strchr(v, '_'); + if (vp != NULL) + *vp = '\0'; + } +#endif + /* * Warn if the actual and expected releases don't match. */ @