Skip to content

Commit d011004

Browse files
committed
fix macos password test and freebsd memory test
1 parent e3a96b0 commit d011004

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ check_function_exists(memalign HAVE_MEMALIGN)
212212
check_function_exists(fts_open HAVE_FTS_OPEN)
213213
check_function_exists(strsep HAVE_STRSEP)
214214
check_function_exists(strptime HAVE_STRPTIME)
215-
check_function_exists(fgetpwent HAVE_FGETPWENT)
216215

217216
check_include_file(syslog.h HAVE_SYSLOG_H)
218217
check_include_file(stdio_ext.h HAVE_STDIO_EXT_H)

config.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
#cmakedefine HAVE_STRSEP
8686
#cmakedefine HAVE_FLOCK
8787
#cmakedefine HAVE_STRPTIME
88-
#cmakedefine HAVE_FGETPWENT
8988

9089
#cmakedefine OPENSCAP_PROBE_INDEPENDENT_ENVIRONMENTVARIABLE
9190
#cmakedefine OPENSCAP_PROBE_INDEPENDENT_ENVIRONMENTVARIABLE58

src/OVAL/probes/unix/password_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
* fgetpwent() is a GNU/glibc extension; provide a portable fallback.
7373
* This parses a standard /etc/passwd-format file one entry at a time.
7474
*/
75-
#ifndef HAVE_FGETPWENT
75+
#if defined(OS_APPLE) || defined(OS_FREEBSD)
7676
static int oscap_parse_passwd_id(const char *field, uintmax_t max_value,
7777
uintmax_t *parsed_value)
7878
{

tests/API/probes/test_memusage_freebsd_stress.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
#endif
66

77
#include <errno.h>
8+
#if defined(OS_FREEBSD)
89
#include <pthread.h>
10+
#endif
911
#include <stdio.h>
1012

1113
#include "memusage.h"
1214

15+
#if defined(OS_FREEBSD)
1316
#define STRESS_THREADS 4
1417
#define STRESS_ITERATIONS 2000
1518

@@ -34,6 +37,7 @@ static void *worker(void *arg)
3437
result->err = 0;
3538
return NULL;
3639
}
40+
#endif
3741

3842
int main(void)
3943
{

0 commit comments

Comments
 (0)