alpine 3.6
obsolete weakness #57

1

Weakness Breakdown


Definition:

An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:

termrec/src/termrec-0.17/sys/compat.h

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

 #ifndef _COMPAT_H
#define _COMPAT_H

#include "config.h"

#ifdef WIN32
# include "win32/net.h"
#else
# define closesocket(x) close(x)
#endif

#ifndef HAVE_ASPRINTF
int asprintf(char **sptr, const char *fmt, ...);
int vasprintf(char **sptr, const char *fmt, va_list ap);
#endif
#ifndef HAVE_GETTIMEOFDAY
void gettimeofday(struct timeval *tv, void * dummy);
#endif
#ifndef HAVE_USLEEP
void usleep(unsigned int usec);
#endif
#ifndef HAVE_PIPE
int pipe(int pipefd[2]);
#endif
#ifndef HAVE_SELECT
// for now, select() _only_ as microsecond sleep()
# define select(d1,d2,d3,d4,timeout) uselect(timeout)
int uselect(struct timeval *timeout);
#endif

#endif 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.