Skip to content
Snippets Groups Projects
  • Colin Walters's avatar
    dd5fd9c1
    missing: Sync from latest systemd, add memfd_create() · dd5fd9c1
    Colin Walters authored
    Planning to use memfd_create() in flatpak and rpm-ostree, which both use
    bubblewrap, and want to pass read-only data via file descriptor to the
    container. Passing via `O_TMPFILE` requires `O_RDWR` (read and write),
    and passing via a pipe would require buffering.
    
    The systemd `missing.h` has grown enormously; I only cherry-picked the bits for
    memfd.
    dd5fd9c1
    History
    missing: Sync from latest systemd, add memfd_create()
    Colin Walters authored
    Planning to use memfd_create() in flatpak and rpm-ostree, which both use
    bubblewrap, and want to pass read-only data via file descriptor to the
    container. Passing via `O_TMPFILE` requires `O_RDWR` (read and write),
    and passing via a pipe would require buffering.
    
    The systemd `missing.h` has grown enormously; I only cherry-picked the bits for
    memfd.
libglnx.h 1.24 KiB
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
 *
 * Copyright (C) 2012,2013,2015 Colin Walters <walters@verbum.org>.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#pragma once

#include <gio/gio.h>

G_BEGIN_DECLS

#include <glnx-macros.h>
#include <glnx-missing.h>
#include <glnx-local-alloc.h>
#include <glnx-backport-autocleanups.h>
#include <glnx-backports.h>
#include <glnx-lockfile.h>
#include <glnx-errors.h>
#include <glnx-dirfd.h>
#include <glnx-shutil.h>
#include <glnx-xattrs.h>
#include <glnx-console.h>
#include <glnx-fdio.h>

G_END_DECLS