Skip to content

Commit d55d682

Browse files
miss-islingtontiran
authored andcommitted
[3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis module Signed-off-by: Christian Heimes <[email protected]> (cherry picked from commit f3031b8)
1 parent a91662a commit d55d682

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
2+
nis module.

setup.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,12 +1365,19 @@ class db_found(Exception): pass
13651365
# Sun yellow pages. Some systems have the functions in libc.
13661366
if (host_platform not in ['cygwin', 'qnx6'] and
13671367
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
1368-
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
1369-
libs = ['nsl']
1370-
else:
1371-
libs = []
1368+
nis_libs = []
1369+
nis_includes = []
1370+
if self.compiler.find_library_file(lib_dirs, 'nsl'):
1371+
nis_libs.append('nsl')
1372+
if self.compiler.find_library_file(lib_dirs, 'tirpc'):
1373+
# Sun RPC has been moved from glibc to libtirpc
1374+
# rpcsvc/yp_prot.h is still in /usr/include, but
1375+
# rpc/rpc.h has been moved into tirpc/ subdir.
1376+
nis_libs.append('tirpc')
1377+
nis_includes.append('/usr/include/tirpc')
13721378
exts.append( Extension('nis', ['nismodule.c'],
1373-
libraries = libs) )
1379+
libraries = nis_libs,
1380+
include_dirs=nis_includes) )
13741381
else:
13751382
missing.append('nis')
13761383
else:

0 commit comments

Comments
 (0)