foxwolf / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Glog incorrectly thinks uname failed on Solaris 10 #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Use glog on Solaris 10 with default log file base name

What is the expected output? What do you see instead?

Expected to see the hostname as part of the filename.
Observed empty string where hostname should have been.

What version of the product are you using? On what operating system?
Using glog 0.3.2 on Solaris 5.10

Please provide any additional information below.
The GetHostName function in logging.cc checks for a uname return value of zero, 
but POSIX specifies that uname can return any non-negative value on success. 
Solaris returns 1, which causes the behaviour above. See attached patch.

Original issue reported on code.google.com by Thoe...@gmail.com on 13 Feb 2013 at 8:46

Attachments: