All source files in lib/hcrypto should be built the same way.
Since this source directory is dependent on libroken then all source
files must be built using the roken.h declarations and included headers.
Also, there is no config.h in the local directory so angle brackets
include of quotes should be used.
Finally, because roken.h includes stdio.h, stdlib.h, stdarg.h, limits.h,
strings.h, sys/types.h, etc., do not include them separately.
Start all source files with
#include <config.h>
#include <roken.h>
Change-Id: I09ab47f8a5472018efe6c8b59a0e51fde8f24724
unix_seed(), called by the add-seed-data op unix_add(), attempts to
write seed data to the random data device. If this fails, the failure
is ignored, as it must be, since there is no way to inform the caller.
This change modifies the way in which the return value from write(2)
is ignored, to avoid compiler warnings when building on Ubuntu 12.10,
with gcc 4.7.2 and eglibc 2.15-0ubuntu20.1.
basiclly this is reverting 164c99a4b4
the problem is when an application is using PAM loaded and unloaded
and over again, the file descriptior never get closed on unload of the
pam module. If main app already uses Heimdal, Heimdal doesn't get
unloaded, but in some scenarios this happen more often.
Since we now use fortuna for our internal random generator, this is
not that bad.
Bug found by Victor Guerra.