Skip to content

Commit ab95b30

Browse files
miss-islingtontiran
authored andcommitted
bpo-32521: nis libtirpc (GH-5137) (#5166)
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 0ebf0ae commit ab95b30

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
@@ -1349,12 +1349,19 @@ class db_found(Exception): pass
13491349
# Sun yellow pages. Some systems have the functions in libc.
13501350
if (host_platform not in ['cygwin', 'atheos', 'qnx6'] and
13511351
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
1352-
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
1353-
libs = ['nsl']
1354-
else:
1355-
libs = []
1352+
nis_libs = []
1353+
nis_includes = []
1354+
if self.compiler.find_library_file(lib_dirs, 'nsl'):
1355+
nis_libs.append('nsl')
1356+
if self.compiler.find_library_file(lib_dirs, 'tirpc'):
1357+
# Sun RPC has been moved from glibc to libtirpc
1358+
# rpcsvc/yp_prot.h is still in /usr/include, but
1359+
# rpc/rpc.h has been moved into tirpc/ subdir.
1360+
nis_libs.append('tirpc')
1361+
nis_includes.append('/usr/include/tirpc')
13561362
exts.append( Extension('nis', ['nismodule.c'],
1357-
libraries = libs) )
1363+
libraries = nis_libs,
1364+
include_dirs=nis_includes) )
13581365
else:
13591366
missing.append('nis')
13601367
else:

0 commit comments

Comments
 (0)