util: Restore min macro in ktime.h

Commit de46edef69 (Remove lowercase min/max macro definitions) removed
the min() macro definition from the util/ktime.h header. Unfortunately,
that min() definition is still required for some of the Windows source
files.

Later, the windows sources can be converted to use the new in-tree
opr_min and opr_max macros, but for now reinstate the min() macro
definition in ktime.h.

Fixes the build errors on Windows:

    msrpc.obj : error LNK2001: unresolved external symbol _min
    RDRFunction.obj : error LNK2001: unresolved external symbol _min
    cm_server.obj : error LNK2019: unresolved external symbol _min referenced
                    in function _cm_SetServerIPRank
    cm_dcache.obj : error LNK2001: unresolved external symbol _min
    cm_vnodeops.obj : error LNK2001: unresolved external symbol _min
    smb3.obj : error LNK2001: unresolved external symbol _min

Change-Id: I043e23e72977ef06330b53f05044cd3be93cc00e
Reviewed-on: https://gerrit.openafs.org/15870
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Michael Meffie 2024-10-19 08:22:59 -04:00
parent 67a5d474fa
commit 7ad7a2bebf

View File

@ -62,4 +62,5 @@ struct ktime {
afs_int32 ktime_InterpretDate(struct ktime_date *akdate);
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif /* __INCL_KTIME_ */