Changeset 217


Ignore:
Timestamp:
Feb 18, 2009, 8:12:56 PM (16 years ago)
Author:
katerina
Message:

Fix ticket #144 missing sh.host.(system|release|machine) on FreeBSD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_unix.c

    r205 r217  
    16631663  SL_RET0(_("sh_unix_localhost"));
    16641664}
    1665 #else
     1665
     1666#else
     1667
     1668/*
     1669 * --FreeBSD code
     1670 */
     1671#if defined(HAVE_UNAME)
     1672#include <sys/utsname.h>
     1673#endif
    16661674void sh_unix_localhost()
    16671675{
     1676#if defined(HAVE_UNAME)
     1677  struct utsname   buf;
     1678#endif
    16681679  struct hostent * he1;
    16691680  int              i;
     
    16741685
    16751686  SL_ENTER(_("sh_unix_localhost"));
     1687
     1688#if defined(HAVE_UNAME)
     1689  (void) uname (&buf);
     1690  /* flawfinder: ignore */ /* ff bug, ff sees system() */
     1691  sl_strlcpy (sh.host.system,  buf.sysname, SH_MINIBUF);
     1692  sl_strlcpy (sh.host.release, buf.release, SH_MINIBUF);
     1693  sl_strlcpy (sh.host.machine, buf.machine, SH_MINIBUF);
     1694#endif
    16761695
    16771696  (void) gethostname (hostname, 1024);
Note: See TracChangeset for help on using the changeset viewer.