summaryrefslogtreecommitdiffstats
path: root/tests/test-nlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-nlist.c')
-rw-r--r--tests/test-nlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-nlist.c b/tests/test-nlist.c
index 679c911b..06163980 100644
--- a/tests/test-nlist.c
+++ b/tests/test-nlist.c
@@ -15,10 +15,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include <config.h>
#include <nlist.h>
#include <stdio.h>
#include <stdlib.h>
-
+#include <string.h>
int var = 1;
@@ -34,6 +35,9 @@ foo (int a)
int
main (int argc, char *argv[] __attribute__ ((unused)))
{
+ if (strcmp(LIBEXT, ".so") != 0)
+ return 77; // test-nlist needs to be an ELF binary for this.
+
struct nlist nl[6] =
{
[0] = { .n_name = "var" },