Changeset 8f2267b in rtems-libbsd for freebsd/contrib/wpa/src/utils/os_unix.c


Ignore:
Timestamp:
Oct 12, 2017, 12:16:07 PM (2 years ago)
Author:
Sichen Zhao <1473996754@…>
Branches:
afaeccc05a556f6aa25ba044a7e49d6aa634a59e, master
Children:
0aa7e63
Parents:
9c9d11b
git-author:
Sichen Zhao <1473996754@…> (10/12/17 12:16:07)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/10/17 12:33:03)
Message:

Port wpa supplicant to RTEMS.

Add wpa_supplicant lib support and shell command support in RTEMS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/contrib/wpa/src/utils/os_unix.c

    r9c9d11b r8f2267b  
    2525#include <mach/mach_time.h>
    2626#endif /* __MACH__ */
     27
     28#ifdef __rtems__
     29#include <unistd.h>
     30#endif /* __rtems__ */
     31
    2732
    2833#include "os.h"
     
    226231int os_daemonize(const char *pid_file)
    227232{
    228 #if defined(__uClinux__) || defined(__sun__)
     233#if defined(__uClinux__) || defined(__sun__) || defined(__rtems__)
    229234        return -1;
    230235#else /* defined(__uClinux__) || defined(__sun__) */
     
    283288                return -1;
    284289
     290#ifdef __rtems__
     291        return getentropy(buf, len);
     292#else /* __rtems__ */
    285293        f = fopen("/dev/urandom", "rb");
    286294        if (f == NULL) {
     
    293301
    294302        return rc != len ? -1 : 0;
     303#endif /* __rtems__ */
    295304}
    296305
Note: See TracChangeset for help on using the changeset viewer.