|
|
| version 1.7, 2025/04/09 19:52:02 | version 1.8, 2025/04/14 19:46:18 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.8 2025/04/14 19:46:18 snw | |
| * Add SHM_REMAP flag to shmat on FreeBSD | |
| * | |
| * Revision 1.7 2025/04/09 19:52:02 snw | * Revision 1.7 2025/04/09 19:52:02 snw |
| * Eliminate as many warnings as possible while building with -Wall | * Eliminate as many warnings as possible while building with -Wall |
| * | * |
| Line 169 short shm_init(const size_t seg_size) | Line 172 short shm_init(const size_t seg_size) |
| fprintf (stderr, "shm_init: detach failed during detach/reattach [shmdt error %s]\r\n", strerror (errno)); | fprintf (stderr, "shm_init: detach failed during detach/reattach [shmdt error %s]\r\n", strerror (errno)); |
| exit (1); | exit (1); |
| } | } |
| #if defined(__FreeBSD__) | |
| shm_config->dta = shmat (shm_config->seg_id, new_addr, SHM_REMAP); | |
| #else | |
| shm_config->dta = shmat (shm_config->seg_id, new_addr, 0); | shm_config->dta = shmat (shm_config->seg_id, new_addr, 0); |
| #endif | |
| if (shm_config->dta == (void *) -1) { | if (shm_config->dta == (void *) -1) { |
| fprintf (stderr, "shm_init: fatal error attaching shared memory segment [shmat error '%s']\r\n", strerror (errno)); | fprintf (stderr, "shm_init: fatal error attaching shared memory segment [shmat error '%s']\r\n", strerror (errno)); |