pldm: Migrate to pldm_edac_crc32()
crc32 is deprecated in the libpldm API due to a lack of a common symbol
prefix. Migrate to pldm_edac_crc32().
Change-Id: I7336267c2325d72b9d0666e0222a591d1468ded4
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index 440057f..e3b89d0 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -364,7 +364,7 @@
if (table.size())
{
tempTable = tableResize();
- checksum = crc32(tempTable.data(), tempTable.size());
+ checksum = pldm_edac_crc32(tempTable.data(), tempTable.size());
}
response.resize(hdrSize + tempTable.size() + sizeof(checksum), 0);
std::copy(tempTable.begin(), tempTable.end(), response.begin() + hdrSize);
@@ -381,7 +381,7 @@
if (table.size())
{
tempTable = tableResize();
- checksum = crc32(tempTable.data(), tempTable.size());
+ checksum = pldm_edac_crc32(tempTable.data(), tempTable.size());
}
}
@@ -412,7 +412,7 @@
}
auto pads = pldm::utils::getNumPadBytes(recordTableSize);
- crc32(fruData.data(), recordTableSize + pads);
+ pldm_edac_crc32(fruData.data(), recordTableSize + pads);
auto iter = fruData.begin() + recordTableSize + pads;
std::copy_n(reinterpret_cast<const uint8_t*>(&checksum), sizeof(checksum),