Bug 2111

Summary: Android does not properly implement utmp or wtmp.
Product: Portable OpenSSH Reporter: Nathan Osman <nathan.osman>
Component: Build systemAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: dtucker
Priority: P5    
Version: 6.2p1   
Hardware: All   
OS: Linux   
Bug Depends on:    
Bug Blocks: 2076    
Attachments:
Description Flags
Disables utmp and wtmp for the Android platform. none

Description Nathan Osman 2013-06-02 02:47:29 AEST
Created attachment 2283 [details]
Disables utmp and wtmp for the Android platform.

After applying the latest patches for Android support in OpenSSH that are set for inclusion in 6.3p1, I received the following errors from gcc:

  loginrec.c: In function 'construct_utmp':
  loginrec.c:665:17: error: 'DEAD_PROCESS' undeclared (first use in this function)
  loginrec.c:665:17: note: each undeclared identifier is reported only once for each function it appears in
  loginrec.c: At top level:
  loginrec.c:727:45: warning: 'struct utmpx' declared inside parameter list [enabled by default]
  loginrec.c:727:45: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
  ...

This is because Android does not properly implement utmp or wtmp. It should be disabled when cross-compiling for the platform. I have attached a patch that disables both of these.
Comment 1 Darren Tucker 2013-06-03 02:03:36 AEST
Applied, thanks.
Comment 2 Damien Miller 2015-08-11 23:03:46 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1