Bug 172744 - Where is ttyslot() (3) in FreeBSD 9.1?
Summary: Where is ttyslot() (3) in FreeBSD 9.1?
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 9.1-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-16 03:00 UTC by goffredo
Modified: 2019-02-21 13:50 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description goffredo 2012-10-16 03:00:00 UTC
I had this problem compiling x11/sessre port:

"
===>  Building for sessreg-1.0.7
make  all-recursive
Making all in man
  GEN      filenames.sed
  GEN      sessreg.1
  CC       sessreg.o
sessreg.c: In function 'main':
sessreg.c:276: warning: assignment discards qualifiers from pointer target type
sessreg.c:281: warning: implicit declaration of function 'ttyslot'
sessreg.c:281: warning: nested extern declaration of 'ttyslot'
sessreg.c: In function 'set_utmp':
sessreg.c:387: warning: declaration of 'line' shadows a global declaration
sessreg.c:93: warning: shadowed declaration is here
sessreg.c: In function 'set_utmpx':
sessreg.c:463: warning: declaration of 'line' shadows a global declaration
sessreg.c:93: warning: shadowed declaration is here
sessreg.c: In function 'Xslot':
sessreg.c:556: warning: declaration of 'ttys_file' shadows a global declaration
sessreg.c:113: warning: shadowed declaration is here
sessreg.c:556: warning: declaration of 'host_name' shadows a global declaration
sessreg.c:108: warning: shadowed declaration is here
sessreg.c: In function 'findslot':
sessreg.c:616: warning: declaration of 'host_name' shadows a global declaration
sessreg.c:108: warning: shadowed declaration is here
sessreg.c:632: warning: assignment discards qualifiers from pointer target type
  CCLD     sessreg
sessreg.o: In function `main':
sessreg.c:(.text+0xc7a): undefined reference to `ttyslot'
*** [sessreg] Error code 1

Stop in /usr/ports/x11/sessreg/work/sessreg-1.0.7.
*** [all-recursive] Error code 1

Stop in /usr/ports/x11/sessreg/work/sessreg-1.0.7.
*** [all] Error code 1

Stop in /usr/ports/x11/sessreg/work/sessreg-1.0.7.
*** [do-build] Error code 1

Stop in /usr/ports/x11/sessreg.
root:[172] 
"

I found ttyslot in man page. Then I made a little thisprogram to test:

"
#include        <stdio.h>
#include        <unistd.h>


main()
{
        printf( "%d\n",ttyslot() );
}
"

Result:

"
goffredo:[1004] cc -s -o ttyslot_test ttyslot_test.c
/tmp//ccyJQC88.o: In function `main':
ttyslot_test.c:(.text+0xa): undefined reference to `ttyslot'

"

I worked around downloading and installing the old package below:

ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/packages/x11/sessreg-1.0.7.tbz

How-To-Repeat: Compile this program:

"
#include        <stdio.h>
#include        <unistd.h>


main()
{
        printf( "%d\n",ttyslot() );
}
"
Comment 1 Yuri Pankov 2012-10-16 09:06:45 UTC
This looks like you forgot to run `make delete-old` after upgrading from 
8.x and sessreg's configure picks up obsolete utmp.h.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2013-02-28 09:38:58 UTC
State Changed
From-To: open->feedback

To submitter: is this still a problem?
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:02 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Sergey Kandaurov freebsd_committer freebsd_triage 2019-02-21 13:50:23 UTC
There's no ttyslot since 9.0+, the error is highly likely caused by stale utmp.h.  Closing after 6y feedback timeout.