fix: ifdef linux specific cpu count compat
[urcu.git] / tests / unit / get_max_cpuid_from_sysfs.c
1 /*
2 * SPDX-License-Identifier: GPL-2.0-or-later
3 *
4 * Copyright (C) 2022 Michael Jeanson <mjeanson@efficios.com>
5 */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 #ifdef __linux__
11
12 #include "compat-smp.h"
13
14 int main(int argc, char *argv[])
15 {
16 int ret;
17
18 if( argc < 2 ) {
19 fprintf(stderr, "Missing argument.\n");
20 return EXIT_FAILURE;
21 }
22
23 ret = _get_max_cpuid_from_sysfs(argv[1]);
24
25 printf("%d\n", ret);
26
27 if (ret >= 0)
28 return EXIT_SUCCESS;
29 else
30 return EXIT_FAILURE;
31 }
32
33 #else
34
35 int main(void)
36 {
37 return EXIT_SUCCESS;
38 }
39 #endif
This page took 0.030301 seconds and 5 git commands to generate.