Bug 251408 - rdisc.c does not compile because OPEN_MAX not defined
Summary: rdisc.c does not compile because OPEN_MAX not defined
Status: CLOSED DUPLICATE of bug 251124
Alias: None
Product: Fedora
Classification: Fedora
Component: iputils   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Martin Bacovsky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-08 19:25 UTC by Sami Farin
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-09 08:25:50 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
use getrlimit instead of OPEN_MAX (719 bytes, patch)
2007-08-08 19:25 UTC, Sami Farin
no flags Details | Diff

Description Sami Farin 2007-08-08 19:25:35 UTC
Description of problem:
gcc     rdisc.c  -lresolv -o rdisc
rdisc.c: In function 'do_fork':
rdisc.c:250: error: 'OPEN_MAX' undeclared (first use in this function)
rdisc.c:250: error: (Each undeclared identifier is reported only once
rdisc.c:250: error: for each function it appears in.)
make: *** [rdisc] Error 1

(glibc-2.6-4)

Version-Release number of selected component (if applicable):
iputils-20070202-3.fc7

How reproducible:
always

Steps to Reproduce:
1. make
2.
3.
  
Actual results:
rdisc.c compilation fails

Expected results:
successful compilation

Additional info:
patch attached

Comment 1 Sami Farin 2007-08-08 19:25:35 UTC
Created attachment 160929 [details]
use getrlimit instead of OPEN_MAX

Comment 2 Martin Bacovsky 2007-08-08 20:00:40 UTC
Yesterday I built iputils-20070202-4.fc8 in RAWHIDE which fix this problem.
Thanks  for patch. I used open_max = sysconf(_SC_OPEN_MAX). Any idea what is
preffered way  of fixing this issue?

Comment 3 Sami Farin 2007-08-08 20:39:35 UTC
Using sysconf is fine, too, but it returns rlim_cur instead of rlim_max.
But nobody probably cares or notices, anyways, and with sysconf you can get away
with smaller number of code lines.

What if returned value is RLIM_INFINITY?
Then user running rdisc might want to fix his/her ulimit.


Comment 4 Martin Bacovsky 2007-08-09 08:25:50 UTC
Well then I close this as duplicate and keep my patch in iputils. Thanks.

*** This bug has been marked as a duplicate of 251124 ***


Note You need to log in before you can comment on or make changes to this bug.