Commit b6d41ff7 authored by Klotz, Tobias's avatar Klotz, Tobias Committed by Dr. Matthias St. Pierre
Browse files

Cleanup vxworks support to be able to compile for VxWorks 7



Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/7569)

(cherry picked from commit 5c8b7b4caa0faedb69277063a7c6b3a8e56c6308)
parent 8e3df401
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2196,7 +2196,7 @@ double app_tminterval(int stop, int usertime)

    return ret;
}
#elif defined(OPENSSL_SYSTEM_VXWORKS)
#elif defined(OPENSSL_SYS_VXWORKS)
# include <time.h>

double app_tminterval(int stop, int usertime)
+14 −0
Original line number Diff line number Diff line
@@ -53,6 +53,20 @@ NON_EMPTY_TRANSLATION_UNIT
#  define LOG_ERR       2
# endif

# if defined(OPENSSL_SYS_VXWORKS)
/* not supported */
int setpgid(pid_t pid, pid_t pgid)
{
    errno = ENOSYS;
    return 0;
}
/* not supported */
pid_t fork(void)
{
    errno = ENOSYS;
    return (pid_t) -1;
}
# endif
/* Maximum leeway in validity period: default 5 minutes */
# define MAX_VALIDITY_PERIOD    (5 * 60)

+20 −0
Original line number Diff line number Diff line
@@ -51,6 +51,26 @@
# endif
# define MAX_COLLISIONS  256

# if defined(OPENSSL_SYS_VXWORKS)
/*
 * VxWorks has no symbolic links
 */

#  define lstat(path, buf) stat(path, buf)

int symlink(const char *target, const char *linkpath)
{
    errno = ENOSYS;
    return -1;
}

ssize_t readlink(const char *pathname, char *buf, size_t bufsiz)
{
    errno = ENOSYS;
    return -1;
}
# endif

typedef struct hentry_st {
    struct hentry_st *next;
    char *filename;
+3 −3
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@
#include <openssl/modes.h>

#ifndef HAVE_FORK
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS)
# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_VXWORKS)
#  define HAVE_FORK 0
# else
#  define HAVE_FORK 1
+5 −0
Original line number Diff line number Diff line
@@ -782,7 +782,12 @@ int BIO_lookup_ex(const char *host, const char *service, int lookup_type,
                 * anyway [above getaddrinfo/gai_strerror is]. We just let
                 * system administrator figure this out...
                 */
# if defined(OPENSSL_SYS_VXWORKS)
                /* h_errno doesn't exist on VxWorks */
                SYSerr(SYS_F_GETHOSTBYNAME, 1000 );
# else
                SYSerr(SYS_F_GETHOSTBYNAME, 1000 + h_errno);
# endif
#else
                SYSerr(SYS_F_GETHOSTBYNAME, WSAGetLastError());
#endif
Loading