From e9b2af91cfab41987e2e92813800ab23581e655d Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Sun, 1 Oct 2023 14:09:39 -0500 Subject: [PATCH] check_c_headers from tuple array to dictionary --- SConstruct | 7 ++++--- drivers/unix/SCsub | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index a06dfc1bde5e..c30c5b11a9aa 100644 --- a/SConstruct +++ b/SConstruct @@ -987,9 +987,10 @@ if selected_platform in platform_list: # Check for the existence of headers conf = Configure(env) if "check_c_headers" in env: - for header in env["check_c_headers"]: - if conf.CheckCHeader(header[0]): - env.AppendUnique(CPPDEFINES=[header[1]]) + headers = env["check_c_headers"] + for header in headers: + if conf.CheckCHeader(header): + env.AppendUnique(CPPDEFINES=[headers[header]]) elif selected_platform != "": if selected_platform == "list": diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 91ef6135463a..146563a3b615 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -4,4 +4,4 @@ Import("env") env.add_source_files(env.drivers_sources, "*.cpp") -env["check_c_headers"] = [["mntent.h", "HAVE_MNTENT"]] +env["check_c_headers"] = {"mntent.h": "HAVE_MNTENT"}