Skip to content

Commit

Permalink
vol_mgr: replace construct_at with placement new
Browse files Browse the repository at this point in the history
Certain compilers we use in our containers seem to not support std::construct_at
  • Loading branch information
alaaeddineelamri authored and arogge committed Nov 7, 2022
1 parent 608f067 commit b1c6f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/stored/vol_mgr.cc
Expand Up @@ -262,7 +262,7 @@ static VolumeReservationItem* new_vol_item(DeviceControlRecord* dcr,
VolumeReservationItem* vol;

vol = (VolumeReservationItem*)malloc(sizeof(VolumeReservationItem));
std::construct_at(vol);
vol = new (vol) VolumeReservationItem();

vol->vol_name = strdup(VolumeName);
if (dcr) {
Expand Down

0 comments on commit b1c6f2c

Please sign in to comment.